yashmayya commented on code in PR #14211: URL: https://github.com/apache/pinot/pull/14211#discussion_r1797582617
########## pinot-spi/src/main/java/org/apache/pinot/spi/utils/CommonConstants.java: ########## @@ -458,6 +458,15 @@ public static class QueryOptionKey { // executed in an Unbounded FCFS fashion. However, secondary workloads are executed in a constrainted FCFS // fashion with limited compute. public static final String IS_SECONDARY_WORKLOAD = "isSecondaryWorkload"; + + // For group by queries with only filtered aggregations (and no non-filtered aggregations), the v1 query engine + // does not compute all groups by default - instead, it will only compute the groups from the filtered result + // set (i.e., union of the main query filter and all the individual aggregation filters). This is good for + // performance, since indexes can be used, but the result won't match standard SQL behavior (where all groups + // are expected to be returned). If this option is set to true, the v1 query engine will compute all groups for + // group by queries with only filtered aggregations. This could require a full scan if the main query does not + // have a filter and performance could be much worse, but the result will be SQL compliant. + public static final String FILTERED_AGGREGATIONS_COMPUTE_ALL_GROUPS = "filteredAggregationsComputeAllGroups"; Review Comment: Actually, thinking about this some more, I really don't like introducing additional behavioral differences between the two query engines. Also, using the same query option but with effectively opposite default values in the query engines is fairly unintuitive. I think it makes more sense to do the right thing by default, and allow users to override the behavior for performance reasons using a query option (which will have the same behavior in both query engines). -- 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