eldenmoon commented on code in PR #39468:
URL: https://github.com/apache/doris/pull/39468#discussion_r1724286857


##########
fe/fe-core/src/main/java/org/apache/doris/catalog/PartitionKey.java:
##########
@@ -77,6 +78,19 @@ public PartitionKey() {
         types = Lists.newArrayList();
     }
 
+    public PartitionKey(PartitionKey other) {
+        this.keys = new ArrayList<>(other.keys.size());
+        for (LiteralExpr expr : other.keys) {
+            try {
+                this.keys.add(LiteralExpr.create(expr.getStringValue(), 
expr.getType()));
+            } catch (AnalysisException e) {
+                e.printStackTrace();

Review Comment:
   do not printStackTrace, throw directly



##########
fe/fe-core/src/main/java/org/apache/doris/catalog/PartitionKey.java:
##########
@@ -77,6 +78,19 @@ public PartitionKey() {
         types = Lists.newArrayList();
     }
 
+    public PartitionKey(PartitionKey other) {

Review Comment:
   bettter add a method and rename to clone



##########
fe/fe-core/src/main/java/org/apache/doris/planner/HashDistributionPruner.java:
##########
@@ -61,6 +62,8 @@ public class HashDistributionPruner implements 
DistributionPruner {
 
     private boolean isBaseIndexSelected;
 
+    private Map<PartitionKey, Set<Long>> distributionKey2TabletID = 
Maps.newHashMap();

Review Comment:
   renmae to distributionKey2TabletIDs and add comment to this field



-- 
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