Jackie-Jiang commented on code in PR #15844: URL: https://github.com/apache/pinot/pull/15844#discussion_r2103609302
########## pinot-core/src/main/java/org/apache/pinot/core/data/table/Key.java: ########## @@ -63,4 +63,14 @@ public int hashCode() { public String toString() { return Arrays.toString(_values); } + @Override + public int compareTo(Key other) { + for (int i = 0; i < _values.length; i++) { + int cmp = ((Comparable<Object>) _values[i]).compareTo(other._values[i]); Review Comment: Here you'll need to handle `null` ########## pinot-core/src/main/java/org/apache/pinot/core/data/table/Key.java: ########## @@ -63,4 +63,14 @@ public int hashCode() { public String toString() { return Arrays.toString(_values); } + @Override Review Comment: (minor) Add an empty line above ########## pinot-spi/src/main/java/org/apache/pinot/spi/utils/CommonConstants.java: ########## @@ -497,6 +497,12 @@ public static class QueryOptionKey { public static final String MIN_BROKER_GROUP_TRIM_SIZE = "minBrokerGroupTrimSize"; public static final String MSE_MIN_GROUP_TRIM_SIZE = "mseMinGroupTrimSize"; + /** + * This will help in getting deterministic and correct result for queries + * with group by and limit but without order by + */ + public static final String ENABLE_DETERMINISTIC_GROUP_TRIM = "enableDeterministicGroupTrim"; Review Comment: I feel `accurateGroupByWithoutOrderBy` is more intuitive -- 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: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org