okumin commented on code in PR #5409: URL: https://github.com/apache/hive/pull/5409#discussion_r1818950095
########## ql/src/java/org/apache/hadoop/hive/ql/optimizer/ConvertJoinMapJoin.java: ########## @@ -714,6 +737,23 @@ private boolean convertJoinBucketMapJoin(JoinOperator joinOp, OptimizeTezProcCon } } + if (bucketFunction != null) { + final Operator<?> bigTableOp = mapJoinOp.getParentOperators().get(bigTablePosition); + for (TableScanOperator tso : OperatorUtils.findOperatorsUpstream(bigTableOp, TableScanOperator.class)) { + tso.getConf().setGroupingPartitionColumns(bucketFunction.getSourceColumnNames()); + tso.getConf().setGroupingNumBuckets(bucketFunction.getNumBuckets()); + } + + for (Operator<?> op : mapJoinOp.getParentOperators()) { + if (!(op instanceof ReduceSinkOperator)) { Review Comment: Done https://github.com/apache/hive/pull/5409/commits/ae7444e8e1c2de95bfc1915af3d3c0245af4b472 ########## ql/src/java/org/apache/hadoop/hive/ql/optimizer/ConvertJoinMapJoin.java: ########## @@ -943,6 +988,10 @@ private boolean checkConvertJoinBucketMapJoin(JoinOperator joinOp, * this is the case when the big table is a sub-query and is probably already bucketed by the * join column in say a group by operation */ + final CustomBucketFunction parentBucketFunction = rs.getOpTraits().getCustomBucketFunctions().get(0); + int numBuckets = parentBucketFunction != null + ? parentBucketFunction.getNumBuckets() Review Comment: Done https://github.com/apache/hive/pull/5409/commits/ae7444e8e1c2de95bfc1915af3d3c0245af4b472 -- 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