-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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(explore): Fix datasource switch for table chart #21544
Conversation
Codecov Report
@@ Coverage Diff @@
## master #21544 +/- ##
=======================================
Coverage 66.68% 66.68%
=======================================
Files 1793 1793
Lines 68538 68537 -1
Branches 7282 7282
=======================================
Hits 45702 45702
+ Misses 20974 20973 -1
Partials 1862 1862
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
/testenv up |
@lyndsiWilliams Ephemeral environment spinning up at http://54.201.68.238:8080. Credentials are |
fixes: #21531 |
@jinghua-qa Looking into this now, thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix. It would be nice if we can add some tests.
Have tested in a workspace with recent superset master and it is working fine, the issue for the time column because string is not related to this PR. LGTM |
@stephenLYZ Thanks for the review! I have adding tests for this case on my list, am going to tackle it separately. |
Ephemeral environment shutdown and build artifacts deleted. |
SUMMARY
Another casualty of #21315 was datasource switching for table chart: after that PR, switching between datasources wouldn't preserve any columns. As a side-effect, saving charts based on SQL queries instead of datasets would fail, as the save process involves switching from the query datasource to the newly-created dataset. This PR fixes the issue, which was specifically caused by #21315 turning
chartState.options
from an object into an array (see #21484).BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before:
After:
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION