Skip to content

Commit

Permalink
fix(explore): missing select when groupby without metrics (apache#12890)
Browse files Browse the repository at this point in the history
  • Loading branch information
villebro committed Feb 2, 2021
1 parent e9ba074 commit 243124b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion superset/connectors/sqla/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -967,7 +967,7 @@ def get_sqla_query( # pylint: disable=too-many-arguments,too-many-locals,too-ma
columns = columns or []
columns = [col for col in columns if col != utils.DTTM_ALIAS]

if (is_sip_38 and metrics and columns) or (not is_sip_38 and metrics):
if metrics or groupby:
# dedup columns while preserving order
columns = columns if is_sip_38 else (groupby or columns)
select_exprs = []
Expand Down

0 comments on commit 243124b

Please sign in to comment.