john-bodley commented on code in PR #24506:
URL: https://github.com/apache/superset/pull/24506#discussion_r1240349126


##########
superset/models/helpers.py:
##########
@@ -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,
+                        utils.FilterOperator.LIKE.value,
                     }:
                         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:

Review Comment:
   Oops. Previously both `LIKE` and `ILIKE` were being materialized as `LIKE`.



##########
superset/models/helpers.py:
##########
@@ -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,

Review Comment:
   The "value" option is not required but I added this for consistency.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to