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

feat: linear imputation in Resample #19393

Merged
merged 2 commits into from
Mar 28, 2022

Conversation

zhaoyongjie
Copy link
Member

@zhaoyongjie zhaoyongjie commented Mar 28, 2022

SUMMARY

Adding a new resample method: linear imputation

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

  1. download DailyDelhiClimateTrain.csv and create a new dataset in your local. (Use PostgreSQL as current testing)

  2. open explore page and select DailyDelhiClimateTrain dataset

  3. change viz type to Bar Chart, notice that you should pick up echart version

  4. drag date in X-Axis

  5. set time range from 2014-12-10 to 2014-12-20

  6. set metric to MAX(meantemp)::INTEGER

  7. set filter to date not in ('2014-12-11'::TIMESTAMP, '2014-12-12'::TIMESTAMP)

  8. you get a bar chart without data for 12-11 and 12-12.
    image

  9. select 1 calendar day frequency and Linear imputation in Advanced analytics panel, then click Run.
    image

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • 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

@zhaoyongjie zhaoyongjie requested review from villebro and a team March 28, 2022 09:28
@codecov
Copy link

codecov bot commented Mar 28, 2022

Codecov Report

Merging #19393 (9781d5c) into master (6f57782) will decrease coverage by 0.02%.
The diff coverage is 100.00%.

❗ Current head 9781d5c differs from pull request most recent head d7a43d0. Consider uploading reports for the commit d7a43d0 to get more accurate results

@@            Coverage Diff             @@
##           master   #19393      +/-   ##
==========================================
- Coverage   66.48%   66.46%   -0.03%     
==========================================
  Files        1670     1670              
  Lines       63952    63958       +6     
  Branches     6506     6506              
==========================================
- Hits        42519    42509      -10     
- Misses      19747    19763      +16     
  Partials     1686     1686              
Flag Coverage Δ
hive 52.80% <33.33%> (-0.01%) ⬇️
mysql 81.65% <100.00%> (+<0.01%) ⬆️
postgres ?
presto 52.65% <33.33%> (-0.01%) ⬇️
python 82.08% <100.00%> (-0.05%) ⬇️
sqlite 81.46% <100.00%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
...-chart-controls/src/sections/advancedAnalytics.tsx 33.33% <ø> (ø)
superset/utils/pandas_postprocessing/resample.py 100.00% <100.00%> (ø)
superset/utils/pandas_postprocessing/utils.py 96.55% <100.00%> (+0.06%) ⬆️
superset/sql_validators/postgres.py 50.00% <0.00%> (-50.00%) ⬇️
superset/reports/commands/log_prune.py 85.71% <0.00%> (-3.58%) ⬇️
superset/db_engine_specs/postgres.py 95.45% <0.00%> (-1.82%) ⬇️
superset/commands/importers/v1/utils.py 92.20% <0.00%> (-1.30%) ⬇️
superset/common/query_object.py 94.73% <0.00%> (-0.53%) ⬇️
superset/views/base_api.py 97.89% <0.00%> (-0.43%) ⬇️
superset/reports/commands/execute.py 91.14% <0.00%> (-0.37%) ⬇️
... and 3 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 6f57782...d7a43d0. Read the comment docs.

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.

Niiiice! Two minor nits, other than that really looking forward to getting this merged 👍

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.

LGTM

@zhaoyongjie zhaoyongjie merged commit a39dd44 into apache:master Mar 28, 2022
villebro pushed a commit that referenced this pull request Apr 3, 2022
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/M 🍒 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.

3 participants