[Feat](planner)create table stmt offer default distribution attribute :random distribution and auto bucket (#35189)
Co-authored-by: feiniaofeiafei <moailing@selectdb.com>
This commit is contained in:
@ -516,7 +516,7 @@ public class CreateTableStmt extends DdlStmt {
|
||||
|
||||
// analyze distribution
|
||||
if (distributionDesc == null) {
|
||||
throw new AnalysisException("Create olap table should contain distribution desc");
|
||||
distributionDesc = new RandomDistributionDesc(FeConstants.default_bucket_num, true);
|
||||
}
|
||||
distributionDesc.analyze(columnSet, columnDefs, keysDesc);
|
||||
if (distributionDesc.type == DistributionInfo.DistributionInfoType.RANDOM) {
|
||||
|
||||
@ -210,7 +210,7 @@ public class CreateTableInfo {
|
||||
|
||||
if (engineName.equalsIgnoreCase("olap")) {
|
||||
if (distribution == null) {
|
||||
throw new AnalysisException("Create olap table should contain distribution desc");
|
||||
distribution = new DistributionDescriptor(false, true, FeConstants.default_bucket_num, null);
|
||||
}
|
||||
properties = maybeRewriteByAutoBucket(distribution, properties);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user