walterddr commented on code in PR #12349:
URL: https://github.com/apache/pinot/pull/12349#discussion_r1475300114


##########
pinot-query-runtime/src/test/resources/queries/FilterAggregates.json:
##########
@@ -75,6 +75,9 @@
       },
       {
         "sql": "SELECT bool_col, COALESCE(min(double_col) FILTER (WHERE 
string_col = 'a' OR string_col = 'b'), 0), COALESCE(max(double_col) FILTER 
(WHERE string_col = 'a' OR int_col > 10), 0), avg(double_col), sum(double_col), 
count(double_col), count(distinct(double_col)) FILTER (WHERE string_col = 'b' 
OR int_col > 10), count(string_col) FROM {tbl} WHERE string_col='b' GROUP BY 
bool_col"
+      },
+      {
+        "sql": "SELECT string_col, count(bool_col) FILTER ( WHERE double_col 
NOT IN (1, 3, 5, 7)) FROM {tbl} WHERE double_col < 10 AND int_col BETWEEN 1 AND 
1 AND int_col <> 1 GROUP BY string_col"

Review Comment:
   this is a super corner case situation: 
   - Where clause reduces the filter into a no-match (`xxx between 1 and 1 and 
xxx <> 1`) 
   - A futher agg filter on top of an already filtered logic (e.g. `yyy < 10` 
and `yyy NOT IN (1, 3, 5, 7)`
   
   then it triggered some rule that didn't merge the filter pushdown and causes 
the NOT_IN to be eval as an actual method.



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