yashlimbad commented on code in PR #4840:
URL: https://github.com/apache/calcite/pull/4840#discussion_r3084147646
##########
core/src/main/java/org/apache/calcite/plan/RelOptUtil.java:
##########
@@ -2934,15 +2934,40 @@ public static boolean classifyFilters(
ImmutableBitSet rightBitmap =
ImmutableBitSet.range(nSysFields + nFieldsLeft, nTotalFields);
+ // Correlation variables introduced by this join itself: i.e. ids whose
+ // binding is established by *this* join (the left input is the producer,
+ // the right input is the consumer). A predicate that references any of
+ // these cannot be pushed to the LEFT input -- the left subtree has no
+ // binder for the variable above it, so the reference would be stranded.
+ // Pushing such a predicate to the RIGHT input is still safe (the right
+ // subtree is the natural consumer of the binding established by this
+ // join), and it can of course stay on the join itself.
Review Comment:
my bad, i forgot to update comments, will update now
--
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]