fix(explore): missing select when groupby without metrics (#12890)

This commit is contained in:
Ville Brofeldt 2021-02-02 17:14:30 +02:00 committed by GitHub
parent 6c018c0a28
commit 36c43113e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -967,7 +967,7 @@ class SqlaTable( # pylint: disable=too-many-public-methods,too-many-instance-at
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 = []