-
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
fix: avoid filters containing null value #17168
Conversation
Codecov Report
@@ Coverage Diff @@
## master #17168 +/- ##
==========================================
- Coverage 76.91% 76.69% -0.22%
==========================================
Files 1038 1039 +1
Lines 55557 55561 +4
Branches 7567 7567
==========================================
- Hits 42729 42614 -115
- Misses 12578 12697 +119
Partials 250 250
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
/testenv up |
@pkdotson Ephemeral environment spinning up at http://54.244.176.33:8080. Credentials are |
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.
Tested in eph env and LGTM! I'll close my pr since it's no longer need. Would be nice to get @villebro checkmark as well!
@zhaoyongjie does the filter box use this same endpoint? IIRC, the filter box select works with null values (the native filter one does, too, but it uses the chart data endpoint for this so won't be affected). If this doesn't affect the filter box then LGTM, otherwise we may need to add an additional param to the endpoint path to toggle between allowing/disallowing nulls and calling it without nulls only on the adhoc filter request. |
Good point! currently(after this PR), changed original behavior. For example, there is a table:
We call the filter endpoint
and now, the response is
but the None value is doesn't fit SQL where clause. for instance:
So, I think we can change old behavior safely. might be I have not considered it well, What do you think about it? |
@zhaoyongjie let me test this quickly, too! |
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.
Code LGTM + Tested to work as expected; the new flow of not making the NULL value available in the adhoc filter select makes more sense as there is the IS NULL option, and the filter box null value dropdown still works like before.
Ephemeral environment shutdown and build artifacts deleted. |
SUMMARY
related PR: #16936
closed: #16803
Avoid filters getting null values. User should add
IS NOT NULL
orIS NULL
operator to handleEmpty
value in SQLBEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
After
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION