zabetak commented on a change in pull request #1325:
URL: https://github.com/apache/hive/pull/1325#discussion_r466404256



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/parse/TezCompiler.java
##########
@@ -1887,13 +1898,14 @@ private void 
removeSemijoinOptimizationByBenefit(OptimizeTezProcContext procCtx)
         // Check the ndv/rows from the SEL vs the destination tablescan the 
semijoin opt is going to.
         TableScanOperator ts = sjInfo.getTsOp();
         RuntimeValuesInfo rti = 
procCtx.parseContext.getRsToRuntimeValuesInfoMap().get(rs);
-        ExprNodeDesc tsExpr = rti.getTsColExpr();
-        // In the SEL operator of the semijoin branch, there should be only 
one column in the operator
-        ExprNodeDesc selExpr = sel.getConf().getColList().get(0);
+        List<ExprNodeDesc> targetColumns = rti.getTargetColumns();
+        // In multi column semijoin branches the last column of the SEL 
operator is hash(c1, c2, ..., cn)
+        // so we shouldn't consider it.
+        List<ExprNodeDesc> sourceColumns = 
sel.getConf().getColList().subList(0, targetColumns.size());

Review comment:
       Done




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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to