jcamachor commented on a change in pull request #729: HIVE-22003
URL: https://github.com/apache/hive/pull/729#discussion_r306078025
##########
File path:
ql/src/java/org/apache/hadoop/hive/ql/optimizer/SharedWorkOptimizer.java
##########
@@ -486,6 +510,75 @@ private static boolean
sharedWorkOptimization(ParseContext pctx, SharedWorkOptim
return mergedExecuted;
}
+ private static void replaceSemijoinExpressions(TableScanOperator tsOp,
List<ExprNodeDesc> semijoinExprNodes) {
Review comment:
Yes, that is correct. But it is not the branch, it is only the expressions.
The reason is that we have already verified that the SJ expressions hitting
both TS operators are the same. At the current step we are already merging.
Thus, what we want now is that the SJ expression from the retainable branch is
on top of the discardable branch too. Since we already had a method to push the
filter expressions on top of the discardable TS (`pushFilterToTopOfTableScan`),
what I have done is that we remove the old SJ expressions from the discardable
TS (and follow-up Filters if present) and we add the SJ expressions from the
retainable TS, hence automatically they will be pushed on top of the
discardable TS. Then we can just remove the discardable TS operator and connect
its output operators with the retainable TS operator.
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]