forked from apache/doris-website
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Doc](function) Support uuid_to_int and int_to_uuid functions (apache…
- Loading branch information
Showing
4 changed files
with
188 additions
and
0 deletions.
There are no files selected for viewing
47 changes: 47 additions & 0 deletions
47
docs/sql-manual/sql-functions/string-functions/int-to-uuid.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
--- | ||
{ | ||
"title": "INT_TO_UUID", | ||
"language": "en" | ||
} | ||
--- | ||
|
||
<!-- | ||
Licensed to the Apache Software Foundation (ASF) under one | ||
or more contributor license agreements. See the NOTICE file | ||
distributed with this work for additional information | ||
regarding copyright ownership. The ASF licenses this file | ||
to you under the Apache License, Version 2.0 (the | ||
"License"); you may not use this file except in compliance | ||
with the License. You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, | ||
software distributed under the License is distributed on an | ||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
KIND, either express or implied. See the License for the | ||
specific language governing permissions and limitations | ||
under the License. | ||
--> | ||
|
||
## int_to_uuid | ||
|
||
### description | ||
|
||
`VARCHAR int_to_uuid(LARGEINT int128)` | ||
|
||
For input encoded LARGEINT, translates to the original uuid string. | ||
|
||
### example | ||
|
||
```sql | ||
mysql> select int_to_uuid(95721955514869408091759290071393952876); | ||
+-----------------------------------------------------+ | ||
| int_to_uuid(95721955514869408091759290071393952876) | | ||
+-----------------------------------------------------+ | ||
| 6ce4766f-6783-4b30-b357-bba1c7600348 | | ||
+-----------------------------------------------------+ | ||
``` | ||
|
||
### keywords | ||
INT_TO_UUID |
47 changes: 47 additions & 0 deletions
47
docs/sql-manual/sql-functions/string-functions/uuid-to-int.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
--- | ||
{ | ||
"title": "UUID_TO_INT", | ||
"language": "en" | ||
} | ||
--- | ||
|
||
<!-- | ||
Licensed to the Apache Software Foundation (ASF) under one | ||
or more contributor license agreements. See the NOTICE file | ||
distributed with this work for additional information | ||
regarding copyright ownership. The ASF licenses this file | ||
to you under the Apache License, Version 2.0 (the | ||
"License"); you may not use this file except in compliance | ||
with the License. You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, | ||
software distributed under the License is distributed on an | ||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
KIND, either express or implied. See the License for the | ||
specific language governing permissions and limitations | ||
under the License. | ||
--> | ||
|
||
## uuid_to_int | ||
|
||
### description | ||
|
||
`LARGEINT uuid_to_int(VARCHAR uuid)` | ||
|
||
Returns an int128 representation of the input uuid string. | ||
|
||
### example | ||
|
||
```sql | ||
mysql> select uuid_to_int("6ce4766f-6783-4b30-b357-bba1c7600348"); | ||
+-----------------------------------------------------+ | ||
| uuid_to_int('6ce4766f-6783-4b30-b357-bba1c7600348') | | ||
+-----------------------------------------------------+ | ||
| 95721955514869408091759290071393952876 | | ||
+-----------------------------------------------------+ | ||
``` | ||
|
||
### keywords | ||
UUID_TO_INT |
47 changes: 47 additions & 0 deletions
47
...n-content-docs/current/sql-manual/sql-functions/string-functions/int-to-uuid.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
--- | ||
{ | ||
"title": "INT_TO_UUID", | ||
"language": "zh-CN" | ||
} | ||
--- | ||
|
||
<!-- | ||
Licensed to the Apache Software Foundation (ASF) under one | ||
or more contributor license agreements. See the NOTICE file | ||
distributed with this work for additional information | ||
regarding copyright ownership. The ASF licenses this file | ||
to you under the Apache License, Version 2.0 (the | ||
"License"); you may not use this file except in compliance | ||
with the License. You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, | ||
software distributed under the License is distributed on an | ||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
KIND, either express or implied. See the License for the | ||
specific language governing permissions and limitations | ||
under the License. | ||
--> | ||
|
||
## int_to_uuid | ||
|
||
### description | ||
|
||
`VARCHAR int_to_uuid(LARGEINT int128)` | ||
|
||
对于输入的已编码 LARGEINT,转译为原始的 uuid 字符串。 | ||
|
||
### example | ||
|
||
```sql | ||
mysql> select int_to_uuid(95721955514869408091759290071393952876); | ||
+-----------------------------------------------------+ | ||
| int_to_uuid(95721955514869408091759290071393952876) | | ||
+-----------------------------------------------------+ | ||
| 6ce4766f-6783-4b30-b357-bba1c7600348 | | ||
+-----------------------------------------------------+ | ||
``` | ||
|
||
### keywords | ||
INT_TO_UUID |
47 changes: 47 additions & 0 deletions
47
...n-content-docs/current/sql-manual/sql-functions/string-functions/uuid-to-int.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
--- | ||
{ | ||
"title": "UUID_TO_INT", | ||
"language": "zh-CN" | ||
} | ||
--- | ||
|
||
<!-- | ||
Licensed to the Apache Software Foundation (ASF) under one | ||
or more contributor license agreements. See the NOTICE file | ||
distributed with this work for additional information | ||
regarding copyright ownership. The ASF licenses this file | ||
to you under the Apache License, Version 2.0 (the | ||
"License"); you may not use this file except in compliance | ||
with the License. You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, | ||
software distributed under the License is distributed on an | ||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
KIND, either express or implied. See the License for the | ||
specific language governing permissions and limitations | ||
under the License. | ||
--> | ||
|
||
## uuid_to_int | ||
|
||
### description | ||
|
||
`LARGEINT uuid_to_int(VARCHAR uuid)` | ||
|
||
对于输入的 uuid 字符串,返回一个 int128 表示。 | ||
|
||
### example | ||
|
||
```sql | ||
mysql> select uuid_to_int("6ce4766f-6783-4b30-b357-bba1c7600348"); | ||
+-----------------------------------------------------+ | ||
| uuid_to_int('6ce4766f-6783-4b30-b357-bba1c7600348') | | ||
+-----------------------------------------------------+ | ||
| 95721955514869408091759290071393952876 | | ||
+-----------------------------------------------------+ | ||
``` | ||
|
||
### keywords | ||
UUID_TO_INT |