-
Notifications
You must be signed in to change notification settings - Fork 13.9k
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
FilterBox visualisation runs one extra query #4249
Comments
mistercrunch
added a commit
to mistercrunch/superset
that referenced
this issue
Jan 24, 2018
Thanks for reporting this and providing all the detail. Fix is here: #4276 |
mistercrunch
added a commit
that referenced
this issue
Jan 25, 2018
michellethomas
pushed a commit
to michellethomas/panoramix
that referenced
this issue
May 24, 2018
wenchma
pushed a commit
to wenchma/incubator-superset
that referenced
this issue
Nov 16, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Make sure these boxes are checked before submitting your issue - thank you!
Superset version
0.22.1
Expected results
For FilterBox visualization (widget) Superset should run one query per filter to get possible filter values.
Actual results
Superset makes two queries (actually, N + 1, where N - number of filters in the widget)
Steps to reproduce
Create FilterBox, and run the query. You will see one extra query on DB end. Easy to reproduce with default dashboard "World's Banks Data" and existing FilterBox.
This is an issue for us because for one of the queries FilterBox does take quite long time (around a minute), but in fact, this time gets doubled in the end, because there are at least two queries run.
I managed to find the source of the issue: file
superset/viz.py
lines276, 278
. See code and my comments:Here, in the subclass
FilterBoxViz (lines 1532-1564)
:I'm not a Python dev and not really sure how to fix this. I would override some other methods in
FilterBoxViz
subclass, but sinceget_df
is used in more methods likeget_csv
(it must be also broken now for FilterBox, btw), I don't know what is the right design. If nobody steps in, I will try to make a PR, but this fix should be trivial for those who know this code.The text was updated successfully, but these errors were encountered: