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

chore: Refetch samples on Explore view only when filters change #11999

Merged
merged 1 commit into from
Jan 2, 2021

Conversation

kgabryje
Copy link
Member

@kgabryje kgabryje commented Dec 10, 2020

SUMMARY

This PR optimizes fetching samples. The goal is not to refetch on every change in controls panel, but only when filters change, because only filters affect the response of samples endpoint.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TEST PLAN

Verify that we refetch samples only when filters change either in Networking tab of browser console or visually, by seeing that there's no spinner that indicates fetching data.

ADDITIONAL INFORMATION

CC: @mistercrunch @rusackas @junlincc @adam-stasiak

@codecov-io
Copy link

Codecov Report

Merging #11999 (b5e6971) into master (38bb6f3) will decrease coverage by 3.21%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #11999      +/-   ##
==========================================
- Coverage   66.74%   63.53%   -3.22%     
==========================================
  Files         942      466     -476     
  Lines       45834    28682   -17152     
  Branches     4400        0    -4400     
==========================================
- Hits        30592    18222   -12370     
+ Misses      15114    10460    -4654     
+ Partials      128        0     -128     
Flag Coverage Δ
cypress ?
javascript ?
python 63.53% <ø> (-0.67%) ⬇️

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

Impacted Files Coverage Δ
superset/db_engines/hive.py 0.00% <0.00%> (-85.72%) ⬇️
superset/sql_validators/postgres.py 50.00% <0.00%> (-50.00%) ⬇️
superset/db_engine_specs/hive.py 54.61% <0.00%> (-29.62%) ⬇️
superset/db_engine_specs/presto.py 69.95% <0.00%> (-12.45%) ⬇️
superset/db_engine_specs/sqlite.py 65.62% <0.00%> (-9.38%) ⬇️
superset/utils/celery.py 96.42% <0.00%> (-3.58%) ⬇️
superset/examples/world_bank.py 97.10% <0.00%> (-2.90%) ⬇️
superset/db_engine_specs/postgres.py 97.56% <0.00%> (-2.44%) ⬇️
superset/examples/birth_names.py 96.51% <0.00%> (-2.33%) ⬇️
superset/views/database/mixins.py 80.70% <0.00%> (-1.76%) ⬇️
... and 487 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 38bb6f3...b5e6971. Read the comment docs.

@kgabryje
Copy link
Member Author

closes #11968

@adam-stasiak
Copy link
Contributor

Tested - no refetch data when doing different operation than filtering (left side of explore view). OK!

@junlincc junlincc requested a review from rusackas December 11, 2020 18:17
Copy link
Member

@rusackas rusackas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@rusackas rusackas requested a review from junlincc December 18, 2020 22:37
@kgabryje
Copy link
Member Author

@rusackas @junlincc Do you think we can merge it?

@junlincc junlincc merged commit 7cc0de1 into apache:master Jan 2, 2021
villebro pushed a commit to preset-io/superset that referenced this pull request Jan 7, 2021
villebro pushed a commit to preset-io/superset that referenced this pull request Jan 7, 2021
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.0.0 labels Mar 12, 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 size/S 🚢 1.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants