This is an automated email from the ASF dual-hosted git repository.
luzhijing pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris-website.git
The following commit(s) were added to refs/heads/master by this push:
new 7bc9b3c14512 [Doc](function) Support uuid_to_int and int_to_uuid
functions (#489)
7bc9b3c14512 is described below
commit 7bc9b3c14512dd827944cbe8643aba40f91f929b
Author: zclllyybb <[email protected]>
AuthorDate: Fri Mar 29 17:57:49 2024 +0800
[Doc](function) Support uuid_to_int and int_to_uuid functions (#489)
---
.../sql-functions/string-functions/int-to-uuid.md | 47 ++++++++++++++++++++++
.../sql-functions/string-functions/uuid-to-int.md | 47 ++++++++++++++++++++++
.../sql-functions/string-functions/int-to-uuid.md | 47 ++++++++++++++++++++++
.../sql-functions/string-functions/uuid-to-int.md | 47 ++++++++++++++++++++++
4 files changed, 188 insertions(+)
diff --git a/docs/sql-manual/sql-functions/string-functions/int-to-uuid.md
b/docs/sql-manual/sql-functions/string-functions/int-to-uuid.md
new file mode 100644
index 000000000000..f768a068af4b
--- /dev/null
+++ b/docs/sql-manual/sql-functions/string-functions/int-to-uuid.md
@@ -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
diff --git a/docs/sql-manual/sql-functions/string-functions/uuid-to-int.md
b/docs/sql-manual/sql-functions/string-functions/uuid-to-int.md
new file mode 100644
index 000000000000..7bc66059b7e4
--- /dev/null
+++ b/docs/sql-manual/sql-functions/string-functions/uuid-to-int.md
@@ -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
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/string-functions/int-to-uuid.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/string-functions/int-to-uuid.md
new file mode 100644
index 000000000000..b9a81e91e9f8
--- /dev/null
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/string-functions/int-to-uuid.md
@@ -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
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/string-functions/uuid-to-int.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/string-functions/uuid-to-int.md
new file mode 100644
index 000000000000..29cc75a53dd0
--- /dev/null
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/string-functions/uuid-to-int.md
@@ -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
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]