You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by jo...@apache.org on 2023/06/23 21:00:38 UTC
[superset] branch master updated: fix: Native filter dynamic numeric search (#24506)
This is an automated email from the ASF dual-hosted git repository.
johnbodley pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/master by this push:
new b9824d687e fix: Native filter dynamic numeric search (#24506)
b9824d687e is described below
commit b9824d687ed5cf3b4982b3d7284d17531705051d
Author: John Bodley <45...@users.noreply.github.com>
AuthorDate: Fri Jun 23 14:00:31 2023 -0700
fix: Native filter dynamic numeric search (#24506)
---
superset/models/helpers.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/superset/models/helpers.py b/superset/models/helpers.py
index dcffe24a48..9e269652c7 100644
--- a/superset/models/helpers.py
+++ b/superset/models/helpers.py
@@ -1852,13 +1852,13 @@ class ExploreMixin: # pylint: disable=too-many-public-methods
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:
where_clause_and.append(sqla_col.like(eq))
else:
where_clause_and.append(sqla_col.ilike(eq))