mayankshriv commented on a change in pull request #4790: Support ORDER BY for 
DISTINCT queries
URL: https://github.com/apache/incubator-pinot/pull/4790#discussion_r348083898
 
 

 ##########
 File path: 
pinot-core/src/main/java/org/apache/pinot/core/data/table/TableResizer.java
 ##########
 @@ -69,40 +72,57 @@
     _orderByValueExtractors = new OrderByValueExtractor[_numOrderBy];
     Comparator[] comparators = new Comparator[_numOrderBy];
 
-    for (int orderByIdx = 0; orderByIdx < _numOrderBy; orderByIdx++) {
-      SelectionSort selectionSort = orderBy.get(orderByIdx);
-      String column = selectionSort.getColumn();
-
-      if (columnIndexMap.containsKey(column)) {
-        int index = columnIndexMap.get(column);
-        if (index < numKeyColumns) {
-          _orderByValueExtractors[orderByIdx] = new KeyColumnExtractor(index);
+    if (numKeyColumns < numColumns) {
 
 Review comment:
   Would it be better to separate out the TableResizer for Aggr and Distinct 
(share as much code as possible, but separate out the custom code into 
different classes)?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to