pvary commented on a change in pull request #3060:
URL: https://github.com/apache/hive/pull/3060#discussion_r816657703



##########
File path: 
ql/src/java/org/apache/hadoop/hive/ql/optimizer/SortedDynPartitionOptimizer.java
##########
@@ -521,34 +570,45 @@ private void inferSortPositions(Operator<? extends 
OperatorDesc> fsParent,
       }
     }
 
-    public ReduceSinkOperator getReduceSinkOp(List<Integer> partitionPositions,
-        List<Integer> sortPositions, List<Integer> sortOrder, List<Integer> 
sortNullOrder,
-        ArrayList<ExprNodeDesc> allCols, ArrayList<ExprNodeDesc> 
bucketColumns, int numBuckets,
-        Operator<? extends OperatorDesc> parent, AcidUtils.Operation 
writeType) throws SemanticException {
+    public ReduceSinkOperator getReduceSinkOp(List<Integer> 
partitionPositions, List<Integer> sortPositions,
+        List<Function<List<ExprNodeDesc>, ExprNodeDesc>> customSortExprs, 
List<Integer> sortOrder,
+        List<Integer> sortNullOrder, ArrayList<ExprNodeDesc> allCols, 
ArrayList<ExprNodeDesc> bucketColumns,
+        int numBuckets, Operator<? extends OperatorDesc> parent, 
AcidUtils.Operation writeType) {
+
+      // Order of KEY columns, if custom sort is present partition and bucket 
columns are disregarded:
+      // 0) Custom sort expressions
+      //                              1) Partition columns
+      //                              2) Bucket number column

Review comment:
       nit: formatting




-- 
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]

Reply via email to