LiBinfeng-01 commented on code in PR #27378: URL: https://github.com/apache/doris/pull/27378#discussion_r1408835869
########## fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/CollectJoinConstraint.java: ########## @@ -47,24 +50,17 @@ public class CollectJoinConstraint implements RewriteRuleFactory { @Override public List<Rule> buildRules() { return ImmutableList.of( - logicalRelation().thenApply(ctx -> { - LeadingHint leading = (LeadingHint) ctx.cascadesContext - .getStatementContext().getHintMap().get("Leading"); - if (leading == null) { - return ctx.root; - } else if (leading.isSyntaxError()) { - return ctx.root; - } - return ctx.root; - }).toRule(RuleType.COLLECT_JOIN_CONSTRAINT), - logicalJoin().thenApply(ctx -> { - LeadingHint leading = (LeadingHint) ctx.cascadesContext - .getStatementContext().getHintMap().get("Leading"); - if (leading == null) { + if (!ctx.cascadesContext.isLeadingJoin()) { return ctx.root; } + LeadingHint leading = (LeadingHint) ctx.cascadesContext + .getHintMap().get("Leading"); LogicalJoin join = ctx.root; + if (join.getJoinType().isNullAwareLeftAntiJoin()) { Review Comment: done -- 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