Skip to content

Commit

Permalink
[chore](bucket error) change new optimizer's error the same with the …
Browse files Browse the repository at this point in the history
…old optimizer (#39653)
  • Loading branch information
yujun777 authored Aug 21, 2024
1 parent 6ec299e commit 6c8d7fb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ public void updateBucketNum(int bucketNum) {
*/
public void validate(Map<String, ColumnDefinition> columnMap, KeysType keysType) {
if (bucketNum <= 0) {
throw new AnalysisException("Buckets number of distribution should be greater than zero.");
throw new AnalysisException(isHash ? "Number of hash distribution should be greater than zero."
: "Number of random distribution should be greater than zero.");
}
if (isHash) {
Set<String> colSet = Sets.newHashSet(cols);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ suite('test_table_with_buckets') {
try {
test {
sql "create table ${tbl1}(k int) distributed by hash(k) buckets 0 properties('replication_num' = '1')"
exception 'Buckets number of distribution should be greater than zero.'
exception 'Number of hash distribution should be greater than zero.'
}

test {
Expand Down

0 comments on commit 6c8d7fb

Please sign in to comment.