Jackie-Jiang commented on code in PR #14211:
URL: https://github.com/apache/pinot/pull/14211#discussion_r1797326904


##########
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:
   That is true if the selectivity of the filter is very high. I'm okay with 
the current approach to ensure no performance regression. We can have a 
separate single option in the future to turn everything into standard SQL



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

Reply via email to