Skip to content

Commit

Permalink
fix(explore): Prevent unnecessary series limit subquery (apache#21154)
Browse files Browse the repository at this point in the history
* Prevent series limit when no series limit columns specified.

* Add timeseries check for legacy charts.

* Apply fix to helpers.py.

* Skip Cypress color consistency tests.
  • Loading branch information
codyml authored and Fahrenheit35 committed Nov 11, 2022
1 parent b3219ef commit 023608f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion superset/connectors/sqla/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1405,7 +1405,9 @@ def get_sqla_query( # pylint: disable=too-many-arguments,too-many-locals,too-ma
col=selected, template_processor=template_processor
)
groupby_all_columns[outer.name] = outer
if not series_column_names or outer.name in series_column_names:
if (
is_timeseries and not series_column_names
) or outer.name in series_column_names:
groupby_series_columns[outer.name] = outer
select_exprs.append(outer)
elif columns:
Expand Down

0 comments on commit 023608f

Please sign in to comment.