You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by va...@apache.org on 2025/05/01 16:29:48 UTC
(superset) branch fix/quote-sorted-metric created (now 149076852b)
This is an automated email from the ASF dual-hosted git repository.
vavila pushed a change to branch fix/quote-sorted-metric
in repository https://gitbox.apache.org/repos/asf/superset.git
at 149076852b fix: Edge case with metric not getting quoted in sort by when normalize_columns is enabled
This branch includes the following new commits:
new 149076852b fix: Edge case with metric not getting quoted in sort by when normalize_columns is enabled
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(superset) 01/01: fix: Edge case with metric not getting quoted in sort by when normalize_columns is enabled
Posted by va...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
vavila pushed a commit to branch fix/quote-sorted-metric
in repository https://gitbox.apache.org/repos/asf/superset.git
commit 149076852bf27b509e408b7295af2ea1b5b64d6f
Author: Vitor Avila <vi...@preset.io>
AuthorDate: Thu May 1 13:29:30 2025 -0300
fix: Edge case with metric not getting quoted in sort by when normalize_columns is enabled
---
superset/models/helpers.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/superset/models/helpers.py b/superset/models/helpers.py
index 5dc97b602a..db05b41584 100644
--- a/superset/models/helpers.py
+++ b/superset/models/helpers.py
@@ -1585,10 +1585,6 @@ class ExploreMixin: # pylint: disable=too-many-public-methods
# use the existing instance.
col = metrics_exprs_by_expr.get(str(col), col)
need_groupby = True
- elif col in columns_by_name:
- col = self.convert_tbl_column_to_sqla_col(
- columns_by_name[col], template_processor=template_processor
- )
elif col in metrics_exprs_by_label:
col = metrics_exprs_by_label[col]
need_groupby = True
@@ -1597,6 +1593,10 @@ class ExploreMixin: # pylint: disable=too-many-public-methods
template_processor=template_processor
)
need_groupby = True
+ elif col in columns_by_name:
+ col = self.convert_tbl_column_to_sqla_col(
+ columns_by_name[col], template_processor=template_processor
+ )
if isinstance(col, ColumnElement):
orderby_exprs.append(col)