-
-
Notifications
You must be signed in to change notification settings - Fork 57
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
feat: optimizer rewrite #5676
feat: optimizer rewrite #5676
Conversation
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found
Additional details and impacted files@@ Coverage Diff @@
## master #5676 +/- ##
==========================================
+ Coverage 89.86% 89.91% +0.04%
==========================================
Files 900 900
Lines 43770 43758 -12
Branches 301 301
==========================================
+ Hits 39333 39344 +11
+ Misses 4395 4372 -23
Partials 42 42 ☔ View full report in Codecov by Sentry. |
0559d74
to
de5cd05
Compare
"""This function is deprecated please use snuba.query.dsl.binary_condition""" | ||
from snuba.query.dsl import binary_condition as dsl_binary_condition | ||
|
||
return dsl_binary_condition(function_name, lhs, rhs) |
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.
couldnt use this function in dsl.py bc of circular import with conditions.py. I thought this belonged in dsl.py anyways so I moved it.
op="processor", description="filter_in_select_optimize" | ||
): | ||
if settings is None: | ||
FilterInSelectOptimizer().process_query(query, HTTPQuerySettings()) |
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 would like to point out that in this context settings can be None, LogicalQueryProcessor interface requires settings not None, thus I had to create dummy object.
Since settings arent used by my processor it doesnt matter, but the fact that i have to create this dummy instead of None smells to me
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 decided to just get these tests working rather than do a refactor that loosens coupling between parsing and post_processing/optimization. Maybe its something I could think about in the future.
Evan made an interesting point about end-to-end testing as a single source of truth, and the increased confidence it brings in the pipeline,
the tradeoff seems to be that this testing file has to change any time another stage is added. Im not sure what the right answer is.
c6f1f40
to
c744ea9
Compare
PR reverted: af29c13 |
This reverts commit f746e1d. Co-authored-by: kylemumma <[email protected]>
https://getsentry.atlassian.net/browse/SNS-2669
This PR should get all of riccardos broken tests passing.
What motivated the rewrite?
Major Changes:
heres how it works now:
or
all the conditions in these functions, and add this to the where clause.ex:
will generate the following
and add it to the where clause