You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/08/02 15:05:19 UTC
[GitHub] [superset] zhaoyongjie opened a new pull request #16026: fix: miss mulitiple metrics on pivot operator
zhaoyongjie opened a new pull request #16026:
URL: https://github.com/apache/superset/pull/16026
### SUMMARY
<!--- Describe the change below, including rationale and design decisions -->
fixes: https://github.com/apache/superset/issues/16023
closes: https://github.com/apache/superset/issues/16023
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
<!--- Skip this if not applicable -->
### After
![image](https://user-images.githubusercontent.com/2016594/127882853-695cb18c-3737-4f18-9063-81e0e26820b9.png)
### TESTING INSTRUCTIONS
<!--- Required! What steps can be taken to manually verify the changes? -->
UT converage
### ADDITIONAL INFORMATION
<!--- Check any relevant boxes with "x" -->
<!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
- [ ] Has associated issue:
- [ ] 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] github-actions[bot] commented on pull request #16026: fix: missing mulitiple metrics on pivot operator
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #16026:
URL: https://github.com/apache/superset/pull/16026#issuecomment-891245497
Ephemeral environment shutdown and build artifacts deleted.
--
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] github-actions[bot] commented on pull request #16026: fix: missing mulitiple metrics on pivot operator
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #16026:
URL: https://github.com/apache/superset/pull/16026#issuecomment-891165818
@junlincc Ephemeral environment spinning up at http://34.222.149.55:8080. Credentials are `admin`/`admin`. Please allow several minutes for bootstrapping and startup.
--
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] zhaoyongjie commented on a change in pull request #16026: fix: miss mulitiple metrics on pivot operator
Posted by GitBox <gi...@apache.org>.
zhaoyongjie commented on a change in pull request #16026:
URL: https://github.com/apache/superset/pull/16026#discussion_r681053429
##########
File path: superset/utils/pandas_postprocessing.py
##########
@@ -271,8 +271,12 @@ def pivot( # pylint: disable=too-many-arguments
series_set = set()
if not drop_missing_columns and columns:
for row in df[columns].itertuples():
- metrics_and_series = tuple(aggfunc.keys()) + tuple(row[1:])
- series_set.add(str(metrics_and_series))
+ metrics_and_series = []
+ for metric in aggfunc.keys():
+ metrics_and_series.append(tuple([metric]) + tuple(row[1:]))
+ for m_series in metrics_and_series:
Review comment:
avoid type hint collision with below
--
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 #16026: fix: missing mulitiple metrics on pivot operator
Posted by GitBox <gi...@apache.org>.
codecov[bot] commented on pull request #16026:
URL: https://github.com/apache/superset/pull/16026#issuecomment-891138286
# [Codecov](https://codecov.io/gh/apache/superset/pull/16026?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 [#16026](https://codecov.io/gh/apache/superset/pull/16026?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (8ef3051) into [master](https://codecov.io/gh/apache/superset/commit/3061b6ad09606c6e1e431c196b3026da8465ba9e?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (3061b6a) will **not change** coverage.
> The diff coverage is `100.00%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/16026/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/superset/pull/16026?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #16026 +/- ##
=======================================
Coverage 76.79% 76.79%
=======================================
Files 990 990
Lines 52517 52517
Branches 6642 6642
=======================================
Hits 40330 40330
Misses 11963 11963
Partials 224 224
```
| Flag | Coverage Δ | |
|---|---|---|
| mysql | `81.57% <100.00%> (-0.05%)` | :arrow_down: |
| postgres | `81.63% <100.00%> (+0.04%)` | :arrow_up: |
| python | `81.72% <100.00%> (ø)` | |
| sqlite | `81.27% <100.00%> (+0.04%)` | :arrow_up: |
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/16026?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/utils/pandas\_postprocessing.py](https://codecov.io/gh/apache/superset/pull/16026/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvdXRpbHMvcGFuZGFzX3Bvc3Rwcm9jZXNzaW5nLnB5) | `84.80% <100.00%> (ø)` | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/16026?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/16026?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [3061b6a...8ef3051](https://codecov.io/gh/apache/superset/pull/16026?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?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
[GitHub] [superset] zhaoyongjie commented on a change in pull request #16026: fix: missing mulitiple metrics on pivot operator
Posted by GitBox <gi...@apache.org>.
zhaoyongjie commented on a change in pull request #16026:
URL: https://github.com/apache/superset/pull/16026#discussion_r681059336
##########
File path: superset/utils/pandas_postprocessing.py
##########
@@ -271,8 +271,12 @@ def pivot( # pylint: disable=too-many-arguments
series_set = set()
if not drop_missing_columns and columns:
for row in df[columns].itertuples():
- metrics_and_series = tuple(aggfunc.keys()) + tuple(row[1:])
- series_set.add(str(metrics_and_series))
+ metrics_and_series = []
+ for metric in aggfunc.keys():
+ metrics_and_series.append(tuple([metric]) + tuple(row[1:]))
+ for m_series in metrics_and_series:
Review comment:
nice! thanks!
--
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] villebro commented on a change in pull request #16026: fix: missing mulitiple metrics on pivot operator
Posted by GitBox <gi...@apache.org>.
villebro commented on a change in pull request #16026:
URL: https://github.com/apache/superset/pull/16026#discussion_r681055755
##########
File path: superset/utils/pandas_postprocessing.py
##########
@@ -271,8 +271,12 @@ def pivot( # pylint: disable=too-many-arguments
series_set = set()
if not drop_missing_columns and columns:
for row in df[columns].itertuples():
- metrics_and_series = tuple(aggfunc.keys()) + tuple(row[1:])
- series_set.add(str(metrics_and_series))
+ metrics_and_series = []
+ for metric in aggfunc.keys():
+ metrics_and_series.append(tuple([metric]) + tuple(row[1:]))
+ for m_series in metrics_and_series:
Review comment:
Can we just do it in one pass, like
```python
for metric in aggfunc.keys():
series_set.add(str(tuple([metric]) + tuple(row[1:])))
```
--
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] github-actions[bot] commented on pull request #16026: fix: missing mulitiple metrics on pivot operator
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #16026:
URL: https://github.com/apache/superset/pull/16026#issuecomment-891197870
@junlincc Ephemeral environment spinning up at http://54.184.39.20:8080. Credentials are `admin`/`admin`. Please allow several minutes for bootstrapping and startup.
--
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] junlincc commented on pull request #16026: fix: missing mulitiple metrics on pivot operator
Posted by GitBox <gi...@apache.org>.
junlincc commented on pull request #16026:
URL: https://github.com/apache/superset/pull/16026#issuecomment-891149549
/testenv up ENABLE_EXPLORE_DRAG_AND_DROP=true
--
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] junlincc commented on pull request #16026: fix: missing mulitiple metrics on pivot operator
Posted by GitBox <gi...@apache.org>.
junlincc commented on pull request #16026:
URL: https://github.com/apache/superset/pull/16026#issuecomment-891242600
lgtm
https://user-images.githubusercontent.com/67837651/127907559-38b6326d-247c-4082-87ab-f88de0e08490.mov
--
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] junlincc commented on pull request #16026: fix: missing mulitiple metrics on pivot operator
Posted by GitBox <gi...@apache.org>.
junlincc commented on pull request #16026:
URL: https://github.com/apache/superset/pull/16026#issuecomment-891194003
/testenv up FEATURE_ENABLE_EXPLORE_DRAG_AND_DROP=true
--
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] pkdotson merged pull request #16026: fix: missing mulitiple metrics on pivot operator
Posted by GitBox <gi...@apache.org>.
pkdotson merged pull request #16026:
URL: https://github.com/apache/superset/pull/16026
--
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] jinghua-qa commented on pull request #16026: fix: missing mulitiple metrics on pivot operator
Posted by GitBox <gi...@apache.org>.
jinghua-qa commented on pull request #16026:
URL: https://github.com/apache/superset/pull/16026#issuecomment-891207708
I have tried in the test env with dd on, I can add multi metrics but DATA panel is not scrollable, and user need to click collapse/expand button in order to see the rest of the filed in DATA and for south tables
--
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