You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by yi...@apache.org on 2024/02/22 05:02:27 UTC
(doris) 13/19: [doc](create table) add since version for some new features (#30506)
This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git
commit bb73561b71264e3d8c62e8401c3873c43b28a5d1
Author: zhannngchen <48...@users.noreply.github.com>
AuthorDate: Thu Feb 22 09:13:35 2024 +0800
[doc](create table) add since version for some new features (#30506)
---
.../sql-reference/Data-Definition-Statements/Create/CREATE-TABLE.md | 4 ++--
.../sql-reference/Data-Definition-Statements/Create/CREATE-TABLE.md | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/docs/en/docs/sql-manual/sql-reference/Data-Definition-Statements/Create/CREATE-TABLE.md b/docs/en/docs/sql-manual/sql-reference/Data-Definition-Statements/Create/CREATE-TABLE.md
index 012720428c2..44dbf5cceb8 100644
--- a/docs/en/docs/sql-manual/sql-reference/Data-Definition-Statements/Create/CREATE-TABLE.md
+++ b/docs/en/docs/sql-manual/sql-reference/Data-Definition-Statements/Create/CREATE-TABLE.md
@@ -115,7 +115,7 @@ Column definition list:
BITMAP_UNION: The aggregation mode of BIMTAP type columns, which performs the union aggregation of bitmaps.
```
- * `AUTO_INCREMENT(auto_inc_start_value)`(Available from version 2.1 and later.)
+ * <version since="2.1" type="inline">`AUTO_INCREMENT(auto_inc_start_value)`</version>
To indicate if the column is a auto-increment column. Auto-increment column can be used to generate a unique identity for new row. If no values are assgined for auto-increment column when inserting, Doris will generate sequence numbers automatically. You can also assign the auto-increment column with NULL literal to indicate Doris to generate sequence numbers. It should be noted that, for performance reasons, BE will cache some values of auto-increment column in memory. Therefore [...]
A table can have at most one auto-incremnt column. The auto-increment column should be BIGINT type and be NOT NULL.
@@ -143,7 +143,7 @@ Column definition list:
dt DATETIME DEFAULT CURRENT_TIMESTAMP
```
- * `on update current_timestamp`
+ * <version since="2.1" type="inline">`on update current_timestamp`</version>
To indicate that whether the value of this column should be updated to the current timestamp (`current_timestamp`) when there is an update on the row. The feature is only available on unique table with merge-on-write enabled. Columns with this feature enabled must declare a default value, and the default value must be `current_timestamp`. If the precision of the timestamp is declared here, the timestamp precision in the default value of the column must be the same as the precisio [...]
diff --git a/docs/zh-CN/docs/sql-manual/sql-reference/Data-Definition-Statements/Create/CREATE-TABLE.md b/docs/zh-CN/docs/sql-manual/sql-reference/Data-Definition-Statements/Create/CREATE-TABLE.md
index e760bf9892f..e8ac8e69f0a 100644
--- a/docs/zh-CN/docs/sql-manual/sql-reference/Data-Definition-Statements/Create/CREATE-TABLE.md
+++ b/docs/zh-CN/docs/sql-manual/sql-reference/Data-Definition-Statements/Create/CREATE-TABLE.md
@@ -106,7 +106,7 @@ distribution_desc
HLL_UNION:HLL 类型的列的聚合方式,通过 HyperLogLog 算法聚合。
BITMAP_UNION:BIMTAP 类型的列的聚合方式,进行位图的并集聚合。
```
- * `AUTO_INCREMENT(auto_inc_start_value)`(2.1版本及以后可用)
+ * <version since="2.1" type="inline">`AUTO_INCREMENT(auto_inc_start_value)`</version>
是否为自增列,自增列可以用来为新插入的行生成一个唯一标识。在插入表数据时如果没有指定自增列的值,则会自动生成一个合法的值。当自增列被显示地插入NULL时,其值也会被替换为生成的合法值。需要注意的是,处于性能考虑,BE会在内存中缓存部分自增列的值,所以自增列自动生成的值只能保证单调性和唯一性,无法保证严格的连续性。
一张表中至多有一个列是自增列,自增列必须是BIGINT类型,且必须为NOT NULL。
@@ -130,7 +130,7 @@ distribution_desc
// 只用于DATETIME类型,导入数据缺失该值时系统将赋予当前时间
dt DATETIME DEFAULT CURRENT_TIMESTAMP
```
- * `on update current_timestamp`
+ * <version since="2.1" type="inline">`on update current_timestamp`</version>
是否在该行有列更新时将该列的值更新为当前时间(`current_timestamp`)。该特性只能在开启了merge-on-write的unique表上使用,开启了这个特性的列必须声明默认值,且默认值必须为`current_timestamp`。如果此处声明了时间戳的精度,则该列默认值中的时间戳精度必须与该处的时间戳精度相同。
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org