-
Notifications
You must be signed in to change notification settings - Fork 13.8k
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: Ensure verbose mapping exists for SQL Lab Query model #23597
fix: Ensure verbose mapping exists for SQL Lab Query model #23597
Conversation
@@ -246,6 +246,7 @@ def data(self) -> Dict[str, Any]: | |||
"database": {"id": self.database_id, "backend": self.database.backend}, | |||
"order_by_choices": order_by_choices, | |||
"schema": self.schema, | |||
"verbose_map": {}, |
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.
Present here for the superset.connectors.base.models.BaseDatasource
model.
44a1f08
to
ef92ba2
Compare
Codecov Report
@@ Coverage Diff @@
## master #23597 +/- ##
==========================================
- Coverage 67.72% 67.72% -0.01%
==========================================
Files 1916 1916
Lines 74051 74054 +3
Branches 8040 8040
==========================================
+ Hits 50153 50154 +1
- Misses 21850 21852 +2
Partials 2048 2048
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 |
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.
LGTM. Thank you for improving type safety.
) (cherry picked from commit 83df609)
SUMMARY
This PR fixes an error when applying post processing for a pivot chart et al. when the underlying datasource is non-materialized, i.e., a
superset.models.sql_lab.Query
object as opposed to a materialized datasource, i.e., asuperset.connectors.base.models.BaseDatasource
object.The underlying issue is that the
superset.models.sql_lab.Query.data
property did not include theverbose_map
field which is present in thesuperset.connectors.base.models.BaseDatasource.data
property, i.e.,BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
CI and tested locally.
ADDITIONAL INFORMATION