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 04f0100b26b975..1d24ceb27ee035 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 @@ -117,9 +117,9 @@ Column definition list: * `AUTO_INCREMENT`(only avaliable in master branch) - 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 columns in memory. Therefore, the values generated by auto-increment columns can only guarantee monotonicity and uniqueness, but not strict continuity. + 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, the values generated by auto-increment column can only guarantee monotonicity and uniqueness, but not strict continuity. A table can have at most one auto-incremnt column. The auto-increment column should be BIGINT type and be NOT NULL. - Currently, only table of duplicate model supports auto-increment column. + Both Duplicate model table and Unique model table support auto-increment column * `default_value` 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 a0648af94d080e..d26b62f493ed77 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 @@ -110,7 +110,7 @@ distribution_desc 是否为自增列,自增列可以用来为新插入的行生成一个唯一标识。在插入表数据时如果没有指定自增列的值,则会自动生成一个合法的值。当自增列被显示地插入NULL时,其值也会被替换为生成的合法值。需要注意的是,处于性能考虑,BE会在内存中缓存部分自增列的值,所以自增列自动生成的值只能保证单调性和唯一性,无法保证严格的连续性。 一张表中至多有一个列是自增列,自增列必须是BIGINT类型,且必须为NOT NULL。 - 目前只有duplicate模型支持自增列。 + Duplicate模型表和Unique模型表均支持自增列。 * `default_value` 列默认值,当导入数据未指定该列的值时,系统将赋予该列default_value。 diff --git a/regression-test/suites/data_model_p0/unique/test_unique_table.groovy b/regression-test/suites/data_model_p0/unique/test_unique_table.groovy index f3fdc71bde8791..eb9bd2b57d7c66 100644 --- a/regression-test/suites/data_model_p0/unique/test_unique_table.groovy +++ b/regression-test/suites/data_model_p0/unique/test_unique_table.groovy @@ -42,20 +42,4 @@ suite("test_unique_table") { order_qt_select_uniq_table "select * from ${tbName}" qt_desc_uniq_table "desc ${tbName}" sql "DROP TABLE ${tbName}" - - def table_auto_inc = "test_aggregate_tab_with_auto_inc_col" - sql "drop table if exists ${table_auto_inc}" - test { - sql """ - CREATE TABLE IF NOT EXISTS ${table_auto_inc} ( - k BIGINT NOT NULL AUTO_INCREMENT, - int_value int, - char_value char(10), - date_value date - ) - UNIQUE KEY(k) - DISTRIBUTED BY HASH(k) BUCKETS 5 properties("replication_num" = "1"); - """ - exception "the auto increment is only supported in duplicate table." - } }