adelapena commented on code in PR #2673:
URL: https://github.com/apache/cassandra/pull/2673#discussion_r1332990976


##########
src/java/org/apache/cassandra/index/Index.java:
##########
@@ -440,6 +445,19 @@ default boolean filtersMultipleContains()
      */
     public RowFilter getPostIndexQueryFilter(RowFilter filter);
 
+    /**
+     * Return a comparator that reorders query result before sending to client
+     *
+     * @param restriction restriction that requires current index
+     * @param columnIndex idx of the indexed column in returned row
+     * @param options query options
+     * @return comparator that for post-query ordering; or null if not 
supported
+     */
+    default Comparator<List<ByteBuffer>> getPostQueryOrdering(Restriction 
restriction, int columnIndex, QueryOptions options)

Review Comment:
   This assumes that the index implementation orders results by a single 
columns. I think the index API will be more generic if it can take multiple 
columns:
   ```suggestion
       default Comparator<List<ByteBuffer>> getPostQueryOrdering(Restriction 
restriction, QueryOptions options, int... columnIndexes)
   ```



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