-
Notifications
You must be signed in to change notification settings - Fork 995
Scalar array operation pushdown to bloom filters #8465
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
Transform `x = any(array[...])` into `bloom1_contains_any` function call that checks the array elements against the bloom filter.
|
@pnthao, @kpan2034: please review this pull request.
|
svenklemm
left a comment
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.
Might be useful to have a dedicated GUC to disable this.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #8465 +/- ##
==========================================
+ Coverage 82.47% 82.53% +0.06%
==========================================
Files 248 248
Lines 47950 48039 +89
Branches 12228 12257 +29
==========================================
+ Hits 39547 39651 +104
- Misses 3498 3525 +27
+ Partials 4905 4863 -42 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
It's a pretty small feature, at the moment it can be disabled with |
|
Looks great, but maybe add more tests following Codecov suggestions: at least tests with coerced types and different collations. |
| } | ||
|
|
||
| List *expr_args = orig_saop->args; | ||
| if (list_length(expr_args) != 2) |
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.
Can ScalarArrayOpExpr have other than 2 args? Maybe Assert would be better?
…8300)" (timescale#8625)" This reverts commit da609e0.
dbeck
left a comment
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.
LGTM
I'm curious, with this change, I bet we could also support the col = IN ('a', 'b', 'c') syntax too, right?
Yeah, it's rewritten to scalar array operation somewhere early, maybe during parsing. I added an example with this syntax to the test. |
Added a missing cast that's been causing debug build failures on macos13 with PG18 after PR timescale#8465
Added a missing cast that's been causing debug build failures on macos13 with PG18 after PR timescale#8465 Disable-check: force-changelog-file
Added a missing cast that's been causing debug build failures on macos13 with PG18 after PR #8465 Disable-check: force-changelog-file
Transform
x = any(array[...])intobloom1_contains_anyfunction call that checks the array elements against the bloom filter sparse index.