You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2019/03/19 08:29:45 UTC

[GitHub] [calcite] rubenada commented on a change in pull request #1112: [CALCITE-2930] FilterCorrelateRule on a Correlate with SemiJoinType SEMI (or ANTI) throws IllegalStateException

rubenada commented on a change in pull request #1112: [CALCITE-2930] FilterCorrelateRule on a Correlate with SemiJoinType SEMI (or ANTI) throws IllegalStateException
URL: https://github.com/apache/calcite/pull/1112#discussion_r266773771
 
 

 ##########
 File path: core/src/main/java/org/apache/calcite/rel/rules/FilterCorrelateRule.java
 ##########
 @@ -86,8 +86,10 @@ public void onMatch(RelOptRuleCall call) {
         aboveFilters,
         JoinRelType.INNER,
         false,
-        !corr.getJoinType().toJoinType().generatesNullsOnLeft(),
-        !corr.getJoinType().toJoinType().generatesNullsOnRight(),
+        corr.getJoinType().returnsJustFirstInput()
+            || !corr.getJoinType().toJoinType().generatesNullsOnLeft(),
+        !corr.getJoinType().returnsJustFirstInput()
+            && !corr.getJoinType().toJoinType().generatesNullsOnRight(),
 
 Review comment:
   The idea is to avoid the `getJoinType().toJoinType()` call for SEMI and ANTI, which can be differentiate because they both have `getJoinType().returnsJustFirstInput() == true`

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services