gortiz commented on code in PR #14211: URL: https://github.com/apache/pinot/pull/14211#discussion_r1797336801
########## 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: Yes, I think we can have a startup config option to choose and the query option to change the default. It is true that having different behaviors by default on each query engine is strange and by having a startup config option each deployment can customize what do they want (current performance or sql compliance) -- 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