danny0405 commented on a change in pull request #1303: [CALCITE-3170] ANTI join
on conditions push down generates wrong plan
URL: https://github.com/apache/calcite/pull/1303#discussion_r300982231
##########
File path: core/src/main/java/org/apache/calcite/rel/rules/FilterJoinRule.java
##########
@@ -195,7 +195,18 @@ protected void perform(RelOptRuleCall call, Filter filter,
// Try to push down filters in ON clause. A ON clause filter can only be
// pushed down if it does not affect the non-matching set, i.e. it is
// not on the side which is preserved.
- if (RelOptUtil.classifyFilters(
+
+ // Anti-join on conditions can not be pushed into left or right, e.g. for
plan:
+ //
+ // Join(condition=[AND(cond1, $2)], joinType=[anti])
+ // : - prj(f0=[$0], f1=[$1], f2=[$2])
+ // : - prj(f0=[$0])
+ //
+ // The semantic would change if join condition $2 is pushed into left,
Review comment:
Added, thanks
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services