[ 
https://issues.apache.org/jira/browse/DRILL-6798?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16670333#comment-16670333
 ] 

ASF GitHub Bot commented on DRILL-6798:
---------------------------------------

amansinha100 commented on a change in pull request #1514: DRILL-6798: Planner 
changes to support semi-join.
URL: https://github.com/apache/drill/pull/1514#discussion_r229765364
 
 

 ##########
 File path: 
exec/java-exec/src/main/java/org/apache/drill/exec/planner/physical/HashJoinPrel.java
 ##########
 @@ -50,14 +51,21 @@
   private int joinControl;
 
   public HashJoinPrel(RelOptCluster cluster, RelTraitSet traits, RelNode left, 
RelNode right, RexNode condition,
-                      JoinRelType joinType) throws InvalidRelException {
-    this(cluster, traits, left, right, condition, joinType, false, null, 
false, JoinControl.DEFAULT);
+                      JoinRelType joinType, boolean semiJoin) throws 
InvalidRelException {
+    this(cluster, traits, left, right, condition, joinType, false, null, 
false, JoinControl.DEFAULT, semiJoin);
+  }
+
+  public HashJoinPrel(RelOptCluster cluster, RelTraitSet traits, RelNode left, 
RelNode right, RexNode condition,
+                      JoinRelType joinType, boolean swapped, RuntimeFilterDef 
runtimeFilterDef,
+                      boolean isRowKeyJoin, int joinControl) throws 
InvalidRelException {
+    this(cluster, traits, left, right, condition, joinType, swapped, 
runtimeFilterDef, isRowKeyJoin, joinControl, false);
   }
 
   public HashJoinPrel(RelOptCluster cluster, RelTraitSet traits, RelNode left, 
RelNode right, RexNode condition,
       JoinRelType joinType, boolean swapped, RuntimeFilterDef runtimeFilterDef,
-      boolean isRowKeyJoin, int joinControl) throws InvalidRelException {
-    super(cluster, traits, left, right, condition, joinType);
+      boolean isRowKeyJoin, int joinControl, boolean semiJoin) throws 
InvalidRelException {
+    super(cluster, traits, left, right, condition, joinType, semiJoin);
+    Preconditions.checkArgument(isSemiJoin && !swapped || swapped && 
!isSemiJoin || (!swapped && !isSemiJoin));
 
 Review comment:
   Why not simplify to :  
   `if (isSemiJoin) {`
      `Preconditions.checkArgument(!swapped : 'swapping of inputs is not 
allowed for semi-joins') `
   `}`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Planner changes to support semi-join
> ------------------------------------
>
>                 Key: DRILL-6798
>                 URL: https://issues.apache.org/jira/browse/DRILL-6798
>             Project: Apache Drill
>          Issue Type: Sub-task
>          Components: Query Planning & Optimization
>    Affects Versions: 1.14.0
>            Reporter: Boaz Ben-Zvi
>            Assignee: Hanumath Rao Maduri
>            Priority: Major
>             Fix For: 1.15.0
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to