github-actions[bot] commented on code in PR #62742:
URL: https://github.com/apache/doris/pull/62742#discussion_r3130357914
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownFilterThroughJoin.java:
##########
@@ -120,11 +120,14 @@ public Rule build() {
Set<Expression> rightPredicates = Sets.newLinkedHashSet();
Set<Expression> remainingPredicates = Sets.newLinkedHashSet();
for (Expression p : filterPredicates) {
- if (p.containsUniqueFunction()) {
+ Set<Slot> slots = p.collect(SlotReference.class::isInstance);
+ if (p.containsUniqueFunction() && slots.isEmpty()) {
Review Comment:
This guard is still too narrow. A one-sided predicate like above a is
evaluated once per joined row in the original plan, but after pushing it into
the right child it is evaluated once per row and then reused for every
matching left row. With one right row joining two left rows, the original plan
can keep one pair and drop the other, while the rewritten plan can only keep
both or none. That makes this a wrong-result path distinct from the
already-discussed thread, and the updated regression outputs now lock in that
unsafe plan.
--
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]