deardeng commented on code in PR #56921:
URL: https://github.com/apache/doris/pull/56921#discussion_r2431260873


##########
fe/fe-core/src/main/java/org/apache/doris/analysis/PartitionExprUtil.java:
##########
@@ -187,7 +193,44 @@ public static Map<String, AddPartitionClause> 
getAddPartitionClauseFromPartition
             }
 
             Map<String, String> partitionProperties = Maps.newHashMap();
-            DistributionDesc distributionDesc = 
olapTable.getDefaultDistributionInfo().toDistributionDesc();
+            DistributionInfo defaultDistributionInfo = 
olapTable.getDefaultDistributionInfo();
+            DistributionDesc distributionDesc = 
defaultDistributionInfo.toDistributionDesc();
+            if (olapTable.isAutoBucket() && partitionType == 
PartitionType.RANGE) {
+                List<Partition> partitions = 
DynamicPartitionScheduler.getHistoricalPartitions(olapTable,

Review Comment:
   这里看 能不能和 auto bucket 计算的地方,抽成一个函数,感觉有冗余,不好维护



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to