[fix](create table) fix nereids create table no check buckets=0 #38971 (#38999)

cherry pick from #38971
This commit is contained in:
yujun
2024-08-09 21:34:35 +08:00
committed by GitHub
parent 1a3f547d35
commit 80b6345270
2 changed files with 57 additions and 0 deletions

View File

@ -72,6 +72,9 @@ public class DistributionDescriptor {
* analyze distribution descriptor
*/
public void validate(Map<String, ColumnDefinition> columnMap, KeysType keysType) {
if (bucketNum <= 0) {
throw new AnalysisException("Buckets number of distribution should be greater than zero.");
}
if (isHash) {
Set<String> colSet = Sets.newHashSet(cols);
if (colSet.size() != cols.size()) {