[multistage][test] adding tests for IN/NOT-IN operation#12349
Merged
walterddr merged 3 commits intoapache:masterfrom Feb 6, 2024
Merged
[multistage][test] adding tests for IN/NOT-IN operation#12349walterddr merged 3 commits intoapache:masterfrom
walterddr merged 3 commits intoapache:masterfrom
Conversation
Codecov Report❌ Patch coverage is
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. 🚀 New features to boost your workflow:
|
walterddr
commented
Feb 1, 2024
| "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" |
Contributor
Author
There was a problem hiding this 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 < 10andyyy 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.
xiangfu0
approved these changes
Feb 5, 2024
suyashpatel98
pushed a commit
to suyashpatel98/pinot
that referenced
this pull request
Feb 28, 2024
* 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
follow up with #12305
this should also close #12035