You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "john-bodley (via GitHub)" <gi...@apache.org> on 2023/04/05 22:34:36 UTC
[GitHub] [superset] john-bodley opened a new pull request, #23597: fix: Ensure verbose mapping exists for SQL Lab Query model
john-bodley opened a new pull request, #23597:
URL: https://github.com/apache/superset/pull/23597
<!---
Please write the PR title following the conventions at https://www.conventionalcommits.org/en/v1.0.0/
Example:
fix(dashboard): load charts correctly
-->
### 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., a `superset.connectors.base.models.BaseDatasource` object.
The underlying issue is that the `superset.models.sql_lab.Query.data` property did not include the `verbose_map` field which is present in the `superset.connectors.base.models.BaseDatasource.data`property, i.e.,
```
File "<prefix>/superset/charts/post_processing.py", line 352, in apply_post_process
df.rename(columns=datasource.data["verbose_map"], inplace=True)
KeyError: 'verbose_map'
```
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
<!--- Skip this if not applicable -->
### TESTING INSTRUCTIONS
CI and tested locally.
### ADDITIONAL INFORMATION
<!--- Check any relevant boxes with "x" -->
<!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
- [ ] Has associated issue:
- [ ] Required feature flags:
- [ ] Changes UI
- [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
- [ ] 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
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] john-bodley commented on a diff in pull request #23597: fix: Ensure verbose mapping exists for SQL Lab Query model
Posted by "john-bodley (via GitHub)" <gi...@apache.org>.
john-bodley commented on code in PR #23597:
URL: https://github.com/apache/superset/pull/23597#discussion_r1159089897
##########
superset/models/sql_lab.py:
##########
@@ -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": {},
Review Comment:
Present [here](https://github.com/apache/superset/blob/56dcf25cf8ac5ed47235ebacde07200ccba257b3/superset/connectors/base/models.py#L293) for the `superset.connectors.base.models.BaseDatasource` model.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] john-bodley merged pull request #23597: fix: Ensure verbose mapping exists for SQL Lab Query model
Posted by "john-bodley (via GitHub)" <gi...@apache.org>.
john-bodley merged PR #23597:
URL: https://github.com/apache/superset/pull/23597
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] codecov[bot] commented on pull request #23597: fix: Ensure verbose mapping exists for SQL Lab Query model
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #23597:
URL: https://github.com/apache/superset/pull/23597#issuecomment-1498253134
## [Codecov](https://codecov.io/gh/apache/superset/pull/23597?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#23597](https://codecov.io/gh/apache/superset/pull/23597?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (c53f60c) into [master](https://codecov.io/gh/apache/superset/commit/56dcf25cf8ac5ed47235ebacde07200ccba257b3?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (56dcf25) will **decrease** coverage by `11.34%`.
> The diff coverage is `57.14%`.
> :exclamation: Current head c53f60c differs from pull request most recent head ef92ba2. Consider uploading reports for the commit ef92ba2 to get more accurate results
```diff
@@ Coverage Diff @@
## master #23597 +/- ##
===========================================
- Coverage 67.72% 56.38% -11.34%
===========================================
Files 1916 1916
Lines 74051 74054 +3
Branches 8040 8040
===========================================
- Hits 50153 41758 -8395
- Misses 21850 30248 +8398
Partials 2048 2048
```
| Flag | Coverage Δ | |
|---|---|---|
| hive | `?` | |
| mysql | `?` | |
| postgres | `?` | |
| presto | `52.67% <57.14%> (-0.01%)` | :arrow_down: |
| python | `58.97% <57.14%> (-23.45%)` | :arrow_down: |
| sqlite | `?` | |
| unit | `52.64% <57.14%> (-0.01%)` | :arrow_down: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/superset/pull/23597?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [superset/models/sql\_lab.py](https://codecov.io/gh/apache/superset/pull/23597?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvbW9kZWxzL3NxbF9sYWIucHk=) | `70.70% <ø> (-4.30%)` | :arrow_down: |
| [superset/utils/core.py](https://codecov.io/gh/apache/superset/pull/23597?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvdXRpbHMvY29yZS5weQ==) | `64.95% <33.33%> (-26.06%)` | :arrow_down: |
| [superset/charts/post\_processing.py](https://codecov.io/gh/apache/superset/pull/23597?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvY2hhcnRzL3Bvc3RfcHJvY2Vzc2luZy5weQ==) | `89.36% <50.00%> (-0.64%)` | :arrow_down: |
| [superset/charts/data/api.py](https://codecov.io/gh/apache/superset/pull/23597?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvY2hhcnRzL2RhdGEvYXBpLnB5) | `88.88% <100.00%> (+0.06%)` | :arrow_up: |
... and [300 files with indirect coverage changes](https://codecov.io/gh/apache/superset/pull/23597/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
:mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org