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

[SQL Lab] Implement refetch results button properly #9220

Merged

Conversation

etr2460
Copy link
Member

@etr2460 etr2460 commented Feb 28, 2020

CATEGORY

Choose one

  • Bug Fix
  • Enhancement (new features, refinement)
  • Refactor
  • Add tests
  • Build / Development Environment
  • Documentation

SUMMARY

Previously, we were rendering the Fetch data preview button when you switched away from a running query tab and switched back after the query finished. Clicking on this button would just rerun the query again. Now we check to see if a results key is set, and if so we fetch the results from the results cache

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

image

TEST PLAN

Run a query in a tab, switch to another tab, come back and click the fetch results button, see no new query run.

Ensure refetching data previews still works.

Ensure running normal queries still work

ADDITIONAL INFORMATION

  • Has associated issue:
  • Changes UI
  • Requires DB Migration.
  • Confirm DB Migration upgrade and downgrade tested.
  • Introduces new feature or API
  • Removes existing feature or API

REVIEWERS

to: @graceguo-supercat @betodealmeida @rusackas

bsSize="sm"
className="fetch"
bsStyle="primary"
onClick={this.reFetchQueryResults.bind(this, {

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

got it. It was bound like this before, but I'll move the binding in both places to the constructor

@etr2460 etr2460 force-pushed the erik-ritter--fix-fetch-data-preview-button branch from 326658f to cf88080 Compare March 2, 2020 21:48
@etr2460
Copy link
Member Author

etr2460 commented Mar 2, 2020

@graceguo-supercat I updated all the instances of bind in the file to happen in the constructor (and removed the bind on the renderControls function since it wasn't needed)

@codecov-io
Copy link

Codecov Report

Merging #9220 into master will decrease coverage by <.01%.
The diff coverage is 60%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #9220      +/-   ##
==========================================
- Coverage   58.92%   58.92%   -0.01%     
==========================================
  Files         372      372              
  Lines       11999    12008       +9     
  Branches     2940     2942       +2     
==========================================
+ Hits         7071     7076       +5     
- Misses       4750     4754       +4     
  Partials      178      178
Impacted Files Coverage Δ
...erset-frontend/src/SqlLab/components/ResultSet.jsx 75.7% <60%> (-1.86%) ⬇️

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 cd4605e...cf88080. Read the comment docs.

Copy link

@graceguo-supercat graceguo-supercat left a comment

Choose a reason for hiding this comment

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

LGTM!

@etr2460 etr2460 merged commit 28c05b2 into apache:master Mar 3, 2020
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.36.0 labels Feb 28, 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/M 🚢 0.36.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants