-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[multistage][test] adding tests for IN/NOT-IN operation #12349
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #12349 +/- ##
============================================
+ Coverage 61.69% 61.73% +0.03%
Complexity 207 207
============================================
Files 2424 2424
Lines 132340 132512 +172
Branches 20436 20481 +45
============================================
+ Hits 81651 81804 +153
- Misses 44693 44711 +18
- Partials 5996 5997 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@@ -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" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
andyyy 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.
* adding case tests for IN/NOT-IN operation * adding filter agg test for IN/NOT_IN as well * reordered switch case --------- Co-authored-by: Rong Rong <rongr@startree.ai>
follow up with #12305
this should also close #12035