fix: broken IS NULL and IS NOT NULL operator#9613
Merged
Merged
Conversation
dpgaspar
reviewed
Apr 22, 2020
| where_clause_and.append(col_obj.get_sqla_col().like(eq)) | ||
| elif op == utils.FilterOperationType.IS_NULL.value: | ||
| where_clause_and.append(col_obj.get_sqla_col() is None) | ||
| where_clause_and.append(col_obj.get_sqla_col() == None) |
Member
There was a problem hiding this comment.
is None and is not None is preferred
Member
Author
There was a problem hiding this comment.
It actually doesn't work in this case (tested), SqlAlchemy expects them to be in this form.
Member
Author
There was a problem hiding this comment.
Going to add unit tests.
Codecov Report
@@ Coverage Diff @@
## master #9613 +/- ##
==========================================
+ Coverage 65.65% 70.54% +4.88%
==========================================
Files 574 574
Lines 30131 30131
Branches 3066 3066
==========================================
+ Hits 19782 21255 +1473
+ Misses 10165 8765 -1400
+ Partials 184 111 -73
Continue to review full report at Codecov.
|
etr2460
pushed a commit
to airbnb/superset-fork
that referenced
this pull request
Apr 24, 2020
* fix: broken is null and is not null operator * add unit tests * Rename filter operator enum
3 tasks
qfcwell
pushed a commit
to qfcwell/superset
that referenced
this pull request
May 12, 2026
* fix: broken is null and is not null operator * add unit tests * Rename filter operator enum
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CATEGORY
Choose one
SUMMARY
#9556 introduced a regression in the SQLA model which broke the
IS NULLandIS NOT NULLoperators. This fixes the regression, adds unit tests that would have cought the regression and renames the filter operator enum to something slightly simpler.TEST PLAN
CI + tested locally
ADDITIONAL INFORMATION
REVIEWERS