Skip to content

Commit

Permalink
[Fix](nereids)Add semantic check that the hash bucket column must be…
Browse files Browse the repository at this point in the history
… a key column when creating table for aggregate and unique models
  • Loading branch information
feiniaofeiafei committed Mar 8, 2024
1 parent eaa74bb commit a8d7066
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ suite("test_rowset_writer_fault", "nonConcurrent") {
`k13` largeint(40) null comment ""
) engine=olap
UNIQUE KEY (k0)
DISTRIBUTED BY HASH(`k1`) BUCKETS 5 properties("replication_num" = "1")
DISTRIBUTED BY HASH(`k0`) BUCKETS 5 properties("replication_num" = "1")
"""

GetDebugPoint().clearDebugPointsForAllBEs()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ suite("test_group_commit_data_bytes_property") {
v bigint
)
UNIQUE KEY(k)
DISTRIBUTED BY HASH (v) BUCKETS 8
DISTRIBUTED BY HASH (k) BUCKETS 8
PROPERTIES(
"replication_num" = "1",
"group_commit_data_bytes"="1024"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ suite("test_group_commit_interval_ms_property") {
v bigint
)
UNIQUE KEY(k)
DISTRIBUTED BY HASH (v) BUCKETS 8
DISTRIBUTED BY HASH (k) BUCKETS 8
PROPERTIES(
"replication_num" = "1",
"group_commit_interval_ms"="10000"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ suite("test_schema_change_agg", "p0") {
partition `old_p1` values [("1"), ("2")),
partition `old_p2` values [("2"), ("3"))
)
DISTRIBUTED BY HASH(pv) BUCKETS 1
DISTRIBUTED BY HASH(citycode) BUCKETS 1
PROPERTIES (
"replication_num" = "1"
);
Expand Down Expand Up @@ -204,8 +204,8 @@ suite("test_schema_change_agg", "p0") {
//distribution key

test {
sql "alter table ${tableName3} modify column pv bigint sum default '0' comment 'pv'"
exception "Can not modify distribution column[pv]. index[${tableName3}]"
sql "alter table ${tableName3} modify column citycode smallint comment 'citycode'"
exception "Can not modify distribution column[citycode]. index[${tableName3}]"
}


Expand Down

0 comments on commit a8d7066

Please sign in to comment.