morrySnow commented on code in PR #27833:
URL: https://github.com/apache/doris/pull/27833#discussion_r1418239783


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/StatementContext.java:
##########
@@ -88,6 +89,8 @@ public class StatementContext {
     private final Map<CTEId, LogicalPlan> rewrittenCteConsumer = new 
HashMap<>();
     private final Set<String> viewDdlSqlSet = Sets.newHashSet();
 
+    private final List<Expression> joinFilters = new ArrayList<>();

Review Comment:
   add some comment to explain what it is use for



##########
fe/fe-core/src/main/java/org/apache/doris/nereids/cost/CostModelV1.java:
##########
@@ -310,6 +325,15 @@ public Cost visitPhysicalHashJoin(
         );
     }
 
+    private int computeConnectivity(

Review Comment:
   add comment to explain it



##########
fe/fe-core/src/main/java/org/apache/doris/nereids/cost/CostModelV1.java:
##########
@@ -262,6 +265,18 @@ public Cost visitPhysicalHashJoin(
 
         double leftRowCount = probeStats.getRowCount();
         double rightRowCount = buildStats.getRowCount();
+        double ignorableDiffBetweenLeftAndRightThreshold = 10.0;

Review Comment:
   add comment to explain it



##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/JoinCommute.java:
##########
@@ -93,7 +93,7 @@ public static boolean check(SwapType swapType, 
LogicalJoin<GroupPlan, GroupPlan>
         if (swapType == SwapType.LEFT_ZIG_ZAG) {
             double leftRows = 
join.left().getGroup().getStatistics().getRowCount();
             double rightRows = 
join.right().getGroup().getStatistics().getRowCount();
-            return leftRows < rightRows && isZigZagJoin(join);
+            return leftRows <= rightRows && isZigZagJoin(join);

Review Comment:
   why change to LE?



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