-
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
Add Option to Optimize NOT
Predicates with Push Down
#14432
base: master
Are you sure you want to change the base?
Conversation
NOT
Predicates By Push Down
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #14432 +/- ##
=============================================
- Coverage 61.75% 0.00% -61.76%
=============================================
Files 2436 3 -2433
Lines 133233 6 -133227
Branches 20636 0 -20636
=============================================
- Hits 82274 0 -82274
+ Misses 44911 6 -44905
+ Partials 6048 0 -6048
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Could we add this functionality behind a query option? I had previously reverted the implicit logic here, since the change made many of our queries hundreds/thousands of times slower.
In this case AND syntax often has the benefit of excluding many docs before y is evaluated. |
That makes sense to me too. I think it would be beneficial to have it - even if it is an option that has to be manually set. I can go ahead and add that option. |
NOT
Predicates By Push DownNOT
Predicates with Push Down
In most cases, I think rewriting |
PushDownNotFilterOptimizer
class that pushes downNOT
operator into group clausesNOT
predicates recursively to fully fragment predicate groupNOT(x AND y)
is converted toNOT(x) OR NOT(y)
)NOT(x OR y AND z)
is first converted toNOT(x OR y) OR NOT(z)
and then converted to(NOT(x) AND NOT(y)) OR NOT(z)