SourabhBadhya commented on code in PR #5717:
URL: https://github.com/apache/hive/pull/5717#discussion_r2071685037
##########
ql/src/java/org/apache/hadoop/hive/ql/optimizer/SharedWorkOptimizer.java:
##########
@@ -1427,12 +1426,29 @@ private static SharedResult
extractSharedOptimizationInfoForRoot(ParseContext pc
if (equalOp1.getNumChild() > 1 || equalOp2.getNumChild() > 1) {
// TODO: Support checking multiple child operators to merge further.
discardableInputOps.addAll(gatherDPPBranchOps(pctx, optimizerCache,
discardableOps));
- return new SharedResult(retainableOps, discardableOps,
discardableInputOps,
- dataSize, maxDataSize);
+
+ // Accumulate InMemoryDataSize of unmerged MapJoin operators.
+ Set<Operator<?>> opsWork1 = findWorkOperators(optimizerCache,
retainableTsOp);
+ for (Operator<?> op : opsWork1) {
+ if (op instanceof MapJoinOperator) {
+ MapJoinOperator mop = (MapJoinOperator) op;
+ dataSize = StatsUtils.safeAdd(dataSize,
mop.getConf().getInMemoryDataSize());
+ maxDataSize =
mop.getConf().getMemoryMonitorInfo().getAdjustedNoConditionalTaskSize();
+ }
+ }
+ Set<Operator<?>> opsWork2 = findWorkOperators(optimizerCache,
discardableTsOp);
Review Comment:
@ngsg Why are we considering discardable table scan operator for datasize
here?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]