jackwener commented on code in PR #14485:
URL: https://github.com/apache/doris/pull/14485#discussion_r1030493409


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/memo/GroupExpression.java:
##########
@@ -105,6 +104,14 @@ public Group child(int i) {
         return children.get(i);
     }
 
+    public void setChild(int i, Group group) {
+        children.set(i, group);

Review Comment:
   set include 
   - child -> parent
   - parent -> child



##########
fe/fe-core/src/main/java/org/apache/doris/nereids/memo/GroupExpression.java:
##########
@@ -105,6 +104,14 @@ public Group child(int i) {
         return children.get(i);
     }
 
+    public void setChild(int i, Group group) {
+        children.set(i, group);
+    }
+
+    public int childrenSize() {
+        return children.size();
+    }
+

Review Comment:
   exist `arity()`



##########
fe/fe-core/src/main/java/org/apache/doris/nereids/memo/Group.java:
##########
@@ -48,12 +49,11 @@ public class Group {
 
     private final List<GroupExpression> logicalExpressions = 
Lists.newArrayList();
     private final List<GroupExpression> physicalExpressions = 
Lists.newArrayList();
-    private LogicalProperties logicalProperties;
-
     // Map of cost lower bounds
     // Map required plan props to cost lower bound of corresponding plan
     private final Map<PhysicalProperties, Pair<Double, GroupExpression>> 
lowestCostPlans = Maps.newHashMap();
-
+    private LogicalProperties logicalProperties;
+    private double costLowerBound = -1;

Review Comment:
   look like redundant



##########
fe/fe-core/src/main/java/org/apache/doris/nereids/memo/GroupExpression.java:
##########
@@ -258,4 +263,8 @@ public String toString() {
         }
         return builder.toString();
     }
+
+    public StatsDeriveResult childStatistics(int idx) {

Review Comment:
   Observe these two files and find that some code modifications are just to 
correct the position
   look like you use `rearrange code`.
   but sometimes it may be better to reduce the original code modification, it 
benefit cheery-pick
   
    



-- 
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: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to