zhengshiJ commented on code in PR #18159: URL: https://github.com/apache/doris/pull/18159#discussion_r1150136421
########## fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/logical/ReorderJoin.java: ########## @@ -76,28 +75,31 @@ public class ReorderJoin extends OneRewriteRuleFactory { @Override public Rule build() { - return logicalFilter(subTree(LogicalJoin.class, LogicalFilter.class)).thenApply(ctx -> { - if (ctx.statementContext.getConnectContext().getSessionVariable().isDisableJoinReorder()) { - return null; - } - LogicalFilter<Plan> filter = ctx.root; - - Map<Plan, JoinHintTypeAndMarkJoinSlot> planToJoinMembers = Maps.newHashMap(); - Plan plan = joinToMultiJoin(filter, planToJoinMembers); - Preconditions.checkState(plan instanceof MultiJoin); - MultiJoin multiJoin = (MultiJoin) plan; - ctx.statementContext.setMaxNArayInnerJoin(multiJoin.children().size()); - Plan after = multiJoinToJoin(multiJoin, planToJoinMembers); - return after; - }).toRule(RuleType.REORDER_JOIN); + return logicalFilter(subTree(LogicalJoin.class, LogicalFilter.class)) + .whenNot(filter -> filter.child() instanceof LogicalJoin + && ((LogicalJoin<?, ?>) filter.child()).isMarkJoin()) Review Comment: right -- 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