Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2869,6 +2869,13 @@ public static void getDdlStmt(DdlStmt ddlStmt, String dbName, TableIf table, Lis
sb.append(olapTable.getCompressionType()).append("\"");
}

// sequence type
if (olapTable.hasSequenceCol()) {
sb.append(",\n\"").append(PropertyAnalyzer.PROPERTIES_FUNCTION_COLUMN + "."
+ PropertyAnalyzer.PROPERTIES_SEQUENCE_TYPE).append("\" = \"");
sb.append(olapTable.getSequenceType().toString()).append("\"");
}

sb.append("\n)");
} else if (table.getType() == TableType.MYSQL) {
MysqlTable mysqlTable = (MysqlTable) table;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ int_value INT Yes false \N REPLACE
char_value CHAR(10) Yes false \N REPLACE
date_value DATE Yes false \N REPLACE
__DORIS_DELETE_SIGN__ TINYINT No false 0 REPLACE
__DORIS_SEQUENCE_COL__ INT Yes false \N REPLACE
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see the code add __DORIS_SEQUENCE_COL__, can you help me point it out

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before fix this bug, when create table b like table a which having column __DORIS_SEQUENCE_COL__, i can not get table b with column __DORIS_SEQUENCE_COL__.

it is diffrent between able a and table b.

when get schema of table a, return table's function_column.sequence_type property, and you will get table b with column __DORIS_SEQUENCE_COL__ like table a.


-- !desc_uniq_table --
k INT Yes true \N
int_value INT Yes false \N REPLACE
char_value CHAR(10) Yes false \N REPLACE
date_value DATE Yes false \N REPLACE
__DORIS_DELETE_SIGN__ TINYINT No false 0 REPLACE
__DORIS_SEQUENCE_COL__ INT Yes false \N REPLACE

Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ suite("test_unique_table_like", "data_model") {
)
ENGINE=OLAP
UNIQUE KEY(k)
DISTRIBUTED BY HASH(k) BUCKETS 5 properties("replication_num" = "1");
DISTRIBUTED BY HASH(k) BUCKETS 5 properties("replication_num" = "1",
"function_column.sequence_type" = "int");
"""
qt_desc_uniq_table "desc ${tbNameA}"
sql """
Expand Down