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: drop the first level of MultiIndex #19716

Merged
merged 9 commits into from
Apr 14, 2022

Conversation

zhaoyongjie
Copy link
Member

@zhaoyongjie zhaoyongjie commented Apr 14, 2022

SUMMARY

Drop the first level of MultiIndex when there is only 1 metric in the query object

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

After

image

image

TESTING INSTRUCTIONS

CI

ADDITIONAL INFORMATION

@zhaoyongjie zhaoyongjie changed the title Fix flatten fix: drop the first level of MultiIndex Apr 14, 2022
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.

Very nice 👍 LGTM with one minor nit

superset/utils/pandas_postprocessing/flatten.py Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Apr 14, 2022

Codecov Report

Merging #19716 (4c7ed13) into master (8865656) will decrease coverage by 0.03%.
The diff coverage is 53.57%.

❗ Current head 4c7ed13 differs from pull request most recent head 72ed22a. Consider uploading reports for the commit 72ed22a to get more accurate results

@@            Coverage Diff             @@
##           master   #19716      +/-   ##
==========================================
- Coverage   66.51%   66.47%   -0.04%     
==========================================
  Files        1684     1684              
  Lines       64560    64573      +13     
  Branches     6625     6630       +5     
==========================================
- Hits        42939    42927      -12     
- Misses      19926    19948      +22     
- Partials     1695     1698       +3     
Flag Coverage Δ
hive 52.69% <66.66%> (+<0.01%) ⬆️
mysql ?
postgres 81.98% <100.00%> (-0.02%) ⬇️
presto 52.54% <66.66%> (+<0.01%) ⬆️
python 82.38% <100.00%> (-0.06%) ⬇️
sqlite 81.77% <100.00%> (+<0.01%) ⬆️
unit 47.75% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...superset-ui-core/src/query/types/PostProcessing.ts 100.00% <ø> (ø)
superset-frontend/src/views/components/SubMenu.tsx 85.96% <ø> (ø)
...perset-frontend/src/views/components/MenuRight.tsx 60.63% <31.57%> (-6.03%) ⬇️
...ui-chart-controls/src/operators/flattenOperator.ts 100.00% <100.00%> (ø)
...rset-ui-core/src/connection/SupersetClientClass.ts 100.00% <100.00%> (ø)
superset-frontend/src/views/CRUD/utils.tsx 64.80% <100.00%> (+0.28%) ⬆️
superset/utils/pandas_postprocessing/flatten.py 100.00% <100.00%> (ø)
superset/common/utils/dataframe_utils.py 85.71% <0.00%> (-7.15%) ⬇️
superset/db_engine_specs/mysql.py 93.97% <0.00%> (-3.62%) ⬇️
superset/reports/commands/log_prune.py 85.71% <0.00%> (-3.58%) ⬇️
... and 7 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8865656...72ed22a. Read the comment docs.

@zhaoyongjie zhaoyongjie merged commit 9425dd2 into apache:master Apr 14, 2022
villebro pushed a commit that referenced this pull request Apr 15, 2022
@zhaoyongjie zhaoyongjie mentioned this pull request Apr 20, 2022
9 tasks
philipher29 pushed a commit to ValtechMobility/superset that referenced this pull request Jun 9, 2022
@mistercrunch mistercrunch added 🍒 1.5.0 🍒 1.5.1 🍒 1.5.2 🍒 1.5.3 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.0.0 labels Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels lts-v1 size/L 🍒 1.5.0 🍒 1.5.1 🍒 1.5.2 🍒 1.5.3 🚢 2.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants