-
Notifications
You must be signed in to change notification settings - Fork 16.6k
feat(explore): Execute predicate query string if set #12998
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
superset/viz.py
Outdated
|
|
||
| def construct_where(self, query_obj: QueryObjectDict, predicate_string: str) -> str: | ||
| if query_obj: | ||
| predicate_string = "{} AND {}".format(query_obj, predicate_string) |
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.
We probably need to add parenthesis here, if either of these has an OR it will break.
| predicate_string = "{} AND {}".format(query_obj, predicate_string) | |
| predicate_string = "({}) AND ({})".format(query_obj, predicate_string) |
Codecov Report
@@ Coverage Diff @@
## master #12998 +/- ##
==========================================
- Coverage 69.14% 66.86% -2.28%
==========================================
Files 1025 490 -535
Lines 48765 28863 -19902
Branches 5188 0 -5188
==========================================
- Hits 33718 19300 -14418
+ Misses 14913 9563 -5350
+ Partials 134 0 -134
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
superset/viz.py
Outdated
| def construct_where(self, query_obj: QueryObjectDict, predicate_string: str) -> str: | ||
| if query_obj: | ||
| predicate_string = "({}) AND ({})".format(query_obj, predicate_string) |
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.
The signature here doesn't seem correct, query_obj here seems to refer to the original where and be Optional[str]?
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.
@villebro makes sense. Thanks for the catch!
|
@eugeniamz @ktmud requesting review to make sure this change is okay with you both. |
|
From the code it seems this only applies to The autocomplete predicate query string is used for this dropdown: which then calls |
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue |

SUMMARY
Execute predicate query string if set to improve the filters loads performance.
#12531
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
issue-12531.mp4
TEST PLAN
ADDITIONAL INFORMATION