pgaref commented on a change in pull request #1152:
URL: https://github.com/apache/hive/pull/1152#discussion_r443617251



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/parse/TezCompiler.java
##########
@@ -1566,13 +1569,38 @@ private void 
removeSemijoinsParallelToMapJoin(OptimizeTezProcContext procCtx)
 
       List<ExprNodeDesc> keyDesc = 
selectedMJOp.getConf().getKeys().get(posBigTable);
       ExprNodeColumnDesc keyCol = (ExprNodeColumnDesc) keyDesc.get(0);
-
-      tsProbeDecodeCtx = new TableScanOperator.ProbeDecodeContext(mjCacheKey, 
mjSmallTablePos,
-          keyCol.getColumn(), selectedMJOpRatio);
+      String realTSColName = getOriginalTSColName(selectedMJOp, 
keyCol.getColumn());
+      if (realTSColName != null) {
+        tsProbeDecodeCtx = new 
TableScanOperator.ProbeDecodeContext(mjCacheKey, mjSmallTablePos,
+                realTSColName, selectedMJOpRatio);
+      } else {
+        LOG.warn("ProbeDecode could not find TSColName for ColKey {} with MJ 
Schema {} ", keyCol, selectedMJOp.getSchema());

Review comment:
       Qtest results here:
   
http://ci.hive.apache.org/blue/organizations/jenkins/hive-precommit/detail/PR-1152/4/tests/
   
   Seems that for for existing MJ ops the probedecode optimisation works fine 
(properly finds original TS col alias as well). Not sure if we want to enable 
probe by default however. Thoughts? cc @ashutoshc 




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