okumin commented on code in PR #5409: URL: https://github.com/apache/hive/pull/5409#discussion_r1822953814
########## ql/src/java/org/apache/hadoop/hive/ql/optimizer/ConvertJoinMapJoin.java: ########## @@ -1521,12 +1570,22 @@ private static int estimateNumBuckets(JoinOperator joinOp, boolean useOpTraits) int estimatedBuckets = -1; for (Operator<? extends OperatorDesc>parentOp : joinOp.getParentOperators()) { - if (parentOp.getOpTraits().getNumBuckets() > 0) { - numBuckets = (numBuckets < parentOp.getOpTraits().getNumBuckets()) ? - parentOp.getOpTraits().getNumBuckets() : numBuckets; + final OpTraits parentOpTraits = parentOp.getOpTraits(); + if (parentOpTraits.getNumBuckets() > 0) { + numBuckets = (numBuckets < parentOpTraits.getNumBuckets()) ? Review Comment: I don't know the original intentions, but your suggestion seems valid. Done https://github.com/apache/hive/pull/5409/commits/c6aa9d2d0a81ff2e8834e1350a18405e593fe212 -- 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: gitbox-unsubscr...@hive.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For additional commands, e-mail: gitbox-h...@hive.apache.org