You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by el...@apache.org on 2022/09/20 20:50:37 UTC

[superset] 27/29: fix(explore): Prevent unnecessary series limit subquery (#21154)

This is an automated email from the ASF dual-hosted git repository.

elizabeth pushed a commit to branch 2.0-test
in repository https://gitbox.apache.org/repos/asf/superset.git

commit 26963d371ca8fb5026ef778340e6f7eea3b26960
Author: Cody Leff <co...@preset.io>
AuthorDate: Fri Aug 26 10:16:13 2022 -0700

    fix(explore): Prevent unnecessary series limit subquery (#21154)
    
    * 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.
---
 superset/connectors/sqla/models.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/superset/connectors/sqla/models.py b/superset/connectors/sqla/models.py
index 7427709465..f06b7fa0b0 100644
--- a/superset/connectors/sqla/models.py
+++ b/superset/connectors/sqla/models.py
@@ -1405,7 +1405,9 @@ class SqlaTable(Model, BaseDatasource):  # pylint: disable=too-many-public-metho
                         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: