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

 ##########
 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:
   I wanted to think about how to extract and share common pieces from 
TableResizer -- since that change will result in cascading changes to 
IndexedTable (the one used in GROUP BY), I thought I can take a stab at it in a 
follow-up. May be have a hierarchy here as well just like we have for Table -> 
BaseTable -> multiple implementations

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