-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[multistage][agg] support agg with filter #11144
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #11144 +/- ##
==========================================
- Coverage 0.11% 0.11% -0.01%
==========================================
Files 2223 2225 +2
Lines 119273 119588 +315
Branches 18055 18109 +54
==========================================
Hits 137 137
- Misses 119116 119431 +315
Partials 20 20
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 18 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
0f55841 to
4c0165d
Compare
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.
i dont know if this is the best API in DataBlockUtils to extract this. alternative is to extract the filter booleans and the IntValues separately, but i cannot make this change individually without changing how agg functions work.
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.
Is it possible to create a FilteredTransferableBlock wrapping up TransferableBlock for AggregateOperator and others to use?
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.
Feeling shouldn't use these many if-else checks
4c0165d to
b18b6fd
Compare
enable theta sketch test for v2 after #11144 and #11153 Co-authored-by: Rong Rong <[email protected]>
* [init][agg] support agg filter where clause * limitation still applies for nullable vs non-nullable results and agg filter merging with select filter, will be address in follow ups. --------- Co-authored-by: Rong Rong <[email protected]>
enable theta sketch test for v2 after apache#11144 and apache#11153 Co-authored-by: Rong Rong <[email protected]>
Description
Support syntax
AGG_FUN(...) FILTER (WHERE ...), such as:SELECT sum(val) FILTER (WHERE col > 10) FROM tblFollow ups
Major
IS NULLandIS NOT NULLas agg filter is not supportedSELECT COUNT(*) FILTER (WHERE a = 1 OR a = 2) FROM tbl WHERE a = 2will result in a compilation errorMinor
ServerPlanRequestVisitor: agg with filter and group-by causes conversion issue on v1 if the group-by field is not in the select list -- work around: selecting out all the group-by fieldsINclause not supported: FILTER WHERE clause with IN hard-wired to translate into subquery in calcite for some reason -- work around: use OR and equal