-
Notifications
You must be signed in to change notification settings - Fork 14k
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: Native filter dynamic numeric search #24506
Conversation
@@ -1852,13 +1852,13 @@ def get_sqla_query( # pylint: disable=too-many-arguments,too-many-locals,too-ma | |||
elif op == utils.FilterOperator.LESS_THAN_OR_EQUALS.value: | |||
where_clause_and.append(sqla_col <= eq) | |||
elif op in { | |||
utils.FilterOperator.ILIKE, | |||
utils.FilterOperator.LIKE, | |||
utils.FilterOperator.ILIKE.value, |
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 "value" option is not required but I added this for consistency.
}: | ||
if target_generic_type != GenericDataType.STRING: | ||
sqla_col = sa.cast(sqla_col, sa.String) | ||
|
||
if utils.FilterOperator.LIKE.value: | ||
if op == utils.FilterOperator.LIKE.value: |
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.
Oops. Previously both LIKE
and ILIKE
were being materialized as LIKE
.
Codecov Report
@@ Coverage Diff @@
## master #24506 +/- ##
=======================================
Coverage 69.06% 69.06%
=======================================
Files 1901 1901
Lines 74019 74019
Branches 8116 8116
=======================================
Hits 51121 51121
Misses 20787 20787
Partials 2111 2111
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
(cherry picked from commit b9824d6)
SUMMARY
Addresses an issue with #24418 with handling
LIKE
vs.ILIKE
.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
CI.
ADDITIONAL INFORMATION