englefly commented on code in PR #27833: URL: https://github.com/apache/doris/pull/27833#discussion_r1418246287
########## 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: initial planA: T1 join T2 if T1.rows = T2.rows, we need candidate planB: T2 join T1. and then connectivity can be used to choose which plan is better -- 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