pvary commented on a change in pull request #3060:
URL: https://github.com/apache/hive/pull/3060#discussion_r816656105
##########
File path:
ql/src/java/org/apache/hadoop/hive/ql/optimizer/SortedDynPartitionOptimizer.java
##########
@@ -169,17 +182,27 @@ public Object process(Node nd, Stack<Node> stack,
NodeProcessorCtx procCtx,
// unlink connection between FS and its parent
Operator<? extends OperatorDesc> fsParent =
fsOp.getParentOperators().get(0);
- // if all dp columns got constant folded then disable this optimization
- if (allStaticPartitions(fsParent, fsOp.getConf().getDynPartCtx())) {
+ DynamicPartitionCtx dpCtx = fsOp.getConf().getDynPartCtx();
+
+ ArrayList<ColumnInfo> parentCols =
Lists.newArrayList(fsParent.getSchema().getSignature());
+ ArrayList<ExprNodeDesc> allRSCols = Lists.newArrayList();
+ for (ColumnInfo ci : parentCols) {
+ allRSCols.add(new ExprNodeColumnDesc(ci));
+ }
+
+ // if all dp columns / custom sort expressions got constant folded then
disable this optimization
+ if (allStaticPartitions(fsParent, allRSCols, dpCtx)) {
LOG.debug("Bailing out of sorted dynamic partition optimizer as all
dynamic partition" +
" columns got constant folded (static partitioning)");
return null;
}
- DynamicPartitionCtx dpCtx = fsOp.getConf().getDynPartCtx();
List<Integer> partitionPositions = getPartitionPositions(dpCtx,
fsParent.getSchema());
+ LinkedList<Function<List<ExprNodeDesc>, ExprNodeDesc>> customSortExprs =
+ new LinkedList<>(dpCtx.getCustomSortExpressions());
Review comment:
Nit: Lists.newLinkedList?
--
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]