Skip to content

Commit

Permalink
fix(explore): Prevent unnecessary series limit subquery (#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 AAfghahi committed Oct 5, 2022
1 parent 025ddbc commit 555d7e3
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 555d7e3

Please sign in to comment.