rubenada commented on a change in pull request #2349:
URL: https://github.com/apache/calcite/pull/2349#discussion_r579130907



##########
File path: core/src/main/java/org/apache/calcite/rel/core/JoinRelType.java
##########
@@ -152,4 +152,29 @@ public JoinRelType cancelNullsOnRight() {
   public boolean projectsRight() {
     return this != SEMI && this != ANTI;
   }
+
+  /** Returns whether this join type accepts pushing predicates from above 
into its predicate. */
+  public boolean canPushIntoFromAbove() {
+    return (this == INNER) || (this == SEMI);

Review comment:
       Are we sure ANTI should not behave as SEMI in `canPushIntoFromAbove`?
   
   In fact, can it really happen a "pushIntoFromAbove" in the context of SEMI 
(or ANTI)? If we push from above a SEMI/ANTI, we know the predicate cannot 
reference the RHS (because SEMI/ANTI don't project it), so it means the 
predicate should be based on the LHS, which means it would be pushLeft (not 
into). Maybe there's some scenario I'm forgetting about where a push into can 
actually happen, so it makes sense to keep the SEMI here, but then I guess ANTI 
should be added too?




----------------------------------------------------------------
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]


Reply via email to