Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Chart series limit doesn't work for some databases #25150

Merged
merged 1 commit into from
Aug 31, 2023

Conversation

KSPT-taylorjohn
Copy link
Contributor

Fix for series limit subquery creation for databases that mutate labels.
Fixes #25073

SUMMARY

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Congrats on making your first PR and thank you for contributing to Superset! 🎉 ❤️

We hope to see you in our Slack community too! Not signed up? Use our Slack App to self-register.

@KSPT-taylorjohn
Copy link
Contributor Author

Please review @villebro

Copy link
Member

@villebro villebro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks for adding that limit subquery alias! LGTM and tested to work as expected.

@villebro
Copy link
Member

villebro commented Aug 31, 2023

@KSPT-taylorjohn there's a lint issue:

diff --git a/superset/models/helpers.py b/superset/models/helpers.py
index 810de46372..c31caa857e 100644
--- a/superset/models/helpers.py
+++ b/superset/models/helpers.py
@@ -1470,7 +1470,7 @@ class ExploreMixin:  # pylint: disable=too-many-public-methods
             db_engine_spec.make_label_compatible(column)
             for column in utils.get_column_names(
                 columns=series_columns or [],
-           )
+            )
         ]
         # deprecated, to be removed in 2.0
         if is_timeseries and timeseries_limit:

Databases that mutate labels that weren't correctly getting the series limit subquery created.
@KSPT-taylorjohn
Copy link
Contributor Author

@villebro Sorry I have fixed that.

@villebro villebro merged commit bbfaeb0 into apache:master Aug 31, 2023
29 checks passed
@villebro villebro added v3.0 Label added by the release manager to track PRs to be included in the 3.0 branch v2.1 labels Aug 31, 2023
@villebro
Copy link
Member

@eschutho @michael-s-molina this PR would be great to get into the next patch release of 3.0 and 2.1 (if we're still doing one more for 2.1)

@eschutho eschutho added the 2.1.2 label Aug 31, 2023
@eschutho
Copy link
Member

Thanks! I just tagged it for 2.1.2 as well.

@villebro
Copy link
Member

FYI @genzgd if someone complains about series limits not working in Superset using Clickhouse Connect

@michael-s-molina
Copy link
Member

michael-s-molina commented Sep 1, 2023

@eschutho @michael-s-molina this PR would be great to get into the next patch release of 3.0 and 2.1 (if we're still doing one more for 2.1)

I'll cherry-pick it for 3.0.0 given that we're still working on RC4.

michael-s-molina pushed a commit that referenced this pull request Sep 1, 2023
darwinsubramaniam pushed a commit to darwinsubramaniam/superset that referenced this pull request Sep 7, 2023
cccs-rc pushed a commit to CybercentreCanada/superset that referenced this pull request Mar 6, 2024
@mistercrunch mistercrunch added 🍒 2.1.2 🍒 2.1.3 🍒 3.0.0 🍒 3.0.1 🍒 3.0.2 🍒 3.0.3 🍒 3.0.4 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels labels Mar 8, 2024
vinothkumar66 pushed a commit to vinothkumar66/superset that referenced this pull request Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.1.2 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/S v2.1 v3.0 Label added by the release manager to track PRs to be included in the 3.0 branch 🍒 2.1.2 🍒 2.1.3 🍒 3.0.0 🍒 3.0.1 🍒 3.0.2 🍒 3.0.3 🍒 3.0.4 🚢 3.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Chart Series Limit doesn't work for Clickhouse datasets
5 participants