diff --git a/docs/en/extending-doris/hive-of-doris.md b/docs/en/extending-doris/hive-of-doris.md index ed730dca22..3d1ccac214 100644 --- a/docs/en/extending-doris/hive-of-doris.md +++ b/docs/en/extending-doris/hive-of-doris.md @@ -88,7 +88,7 @@ PROPERTIES ( The supported Hive column types correspond to Doris in the following table. -| Hive | Doris | 描述 | +| Hive | Doris | Description | | :------: | :----: | :-------------------------------: | | BOOLEAN | BOOLEAN | | | CHAR | CHAR | Only UTF8 encoding is supported | @@ -101,7 +101,7 @@ The supported Hive column types correspond to Doris in the following table. | DOUBLE | DOUBLE | | | DECIMAL | DECIMAL | | | DATE | DATE | | -| DATETIME | TIMESTAMP | Timestamp to Datetime will lose precision | +| TIMESTAMP | DATETIME | Timestamp to Datetime will lose precision | **Note:** - Hive table Schema changes **are not automatically synchronized** and require rebuilding the Hive external table in Doris. diff --git a/docs/en/sql-reference/sql-statements/Data Definition/create-function.md b/docs/en/sql-reference/sql-statements/Data Definition/create-function.md index 417678c2fd..fdd08ed2d1 100644 --- a/docs/en/sql-reference/sql-statements/Data Definition/create-function.md +++ b/docs/en/sql-reference/sql-statements/Data Definition/create-function.md @@ -135,8 +135,8 @@ If the `function_name` contains the database name, the custom function will be c AS CONCAT(LEFT(id, 3), '****', RIGHT(id, 4)); -- create a custom cast alias function - CREATE ALIAS FUNCTION decimal(ALL, INT, INT) WITH PARAMETER(col, precision, scale) - AS CAST(col AS decimal(precision, scale)); + CREATE ALIAS FUNCTION string(ALL, INT) WITH PARAMETER(col, length) + AS CAST(col AS varchar(length)); ``` ## keyword diff --git a/docs/zh-CN/extending-doris/hive-of-doris.md b/docs/zh-CN/extending-doris/hive-of-doris.md index 759e689595..545b8100a4 100644 --- a/docs/zh-CN/extending-doris/hive-of-doris.md +++ b/docs/zh-CN/extending-doris/hive-of-doris.md @@ -101,7 +101,7 @@ PROPERTIES ( | DOUBLE | DOUBLE | | | DECIMAL | DECIMAL | | | DATE | DATE | | -| DATETIME | TIMESTAMP | Timestamp 转成 Datetime 会损失精度 | +| TIMESTAMP | DATETIME | Timestamp 转成 Datetime 会损失精度 | **注意:** - Hive 表 Schema 变更**不会自动同步**,需要在 Doris 中重建 Hive 外表。 diff --git a/docs/zh-CN/sql-reference/sql-statements/Data Definition/create-function.md b/docs/zh-CN/sql-reference/sql-statements/Data Definition/create-function.md index cf6a4fe04c..98d9ce0593 100644 --- a/docs/zh-CN/sql-reference/sql-statements/Data Definition/create-function.md +++ b/docs/zh-CN/sql-reference/sql-statements/Data Definition/create-function.md @@ -136,8 +136,8 @@ CREATE [AGGREGATE] [ALIAS] FUNCTION function_name AS CONCAT(LEFT(id, 3), '****', RIGHT(id, 4)); -- 创建自定义 CAST 别名函数 - CREATE ALIAS FUNCTION decimal(ALL, INT, INT) WITH PARAMETER(col, precision, scale) - AS CAST(col AS decimal(precision, scale)); + CREATE ALIAS FUNCTION string(ALL, INT) WITH PARAMETER(col, length) + AS CAST(col AS varchar(length)); ``` ## keyword