deniskuzZ commented on code in PR #5409: URL: https://github.com/apache/hive/pull/5409#discussion_r1813138723
########## ql/src/java/org/apache/hadoop/hive/ql/optimizer/metainfo/annotation/OpTraitsRulesProcFactory.java: ########## @@ -367,34 +430,48 @@ public List<List<String>> getConvertedColNames( public Object process(Node nd, Stack<Node> stack, NodeProcessorCtx procCtx, Object... nodeOutputs) throws SemanticException { SelectOperator selOp = (SelectOperator) nd; - List<List<String>> parentBucketColNames = - selOp.getParentOperators().get(0).getOpTraits().getBucketColNames(); + OpTraits parentOpTraits = selOp.getParentOperators().get(0).getOpTraits(); + List<List<String>> parentBucketColNames = parentOpTraits.getBucketColNames(); List<List<String>> listBucketCols = null; List<List<String>> listSortCols = null; if (selOp.getColumnExprMap() != null) { if (parentBucketColNames != null) { listBucketCols = getConvertedColNames(parentBucketColNames, selOp, false); } - List<List<String>> parentSortColNames = - selOp.getParentOperators().get(0).getOpTraits().getSortCols(); + List<List<String>> parentSortColNames = parentOpTraits.getSortCols(); if (parentSortColNames != null) { listSortCols = getConvertedColNames(parentSortColNames, selOp, true); } } - int numBuckets = -1; - int numReduceSinks = 0; - OpTraits parentOpTraits = selOp.getParentOperators().get(0).getOpTraits(); - if (parentOpTraits != null) { - // if bucket columns are empty, then numbuckets must be set to -1. - if (listBucketCols != null && - !(listBucketCols.isEmpty() || listBucketCols.get(0).isEmpty())) { - numBuckets = parentOpTraits.getNumBuckets(); + final List<CustomBucketFunction> bucketFunctions; + if (listBucketCols == null) { + bucketFunctions = null; Review Comment: set it to 'null' by default -- 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