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: show the total row count in the SQL Lab Query History tab when limited by DISPLAY_MAX_ROW #19054

Conversation

diegomedina248
Copy link
Contributor

SUMMARY

When the row count of a query executed in the SQL Lab is greater than the DISPLAY_MAX_ROW config, the row count shows incorrectly in the Query History tab.

The expected result is the row count to show the actual number of rows queried, regardless of the DISPLAY_MAX_ROW config, since that's only used to limit the result display.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before:
Screen Shot 2022-03-07 at 22 37 46

After:
Screen Shot 2022-03-07 at 22 36 56

TESTING INSTRUCTIONS

  • Set the limit dropdown to 100k
  • Run a query (SELECT country_name from wb_health_population for example) with more than 10k rows
  • Run another query (a expensive one, like SELECT * from wb_health_population)
  • Refresh the page while the previous query is executing
  • Switch to the query history tab in SQL Lab

It might be needed to try this a couple of times to reproduce the issue

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

@yousoph
Copy link
Member

yousoph commented Mar 8, 2022

/testenv up

@github-actions
Copy link
Contributor

github-actions bot commented Mar 8, 2022

@yousoph Container image not yet published for this PR. Please try again when build is complete.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 8, 2022

@yousoph Ephemeral environment creation failed. Please check the Actions logs for details.

Copy link
Contributor

@codemaster08240328 codemaster08240328 left a comment

Choose a reason for hiding this comment

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

Looks Good.

@codecov
Copy link

codecov bot commented Mar 8, 2022

Codecov Report

Merging #19054 (329a7a6) into master (e89f0ab) will decrease coverage by 0.00%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #19054      +/-   ##
==========================================
- Coverage   66.52%   66.52%   -0.01%     
==========================================
  Files        1641     1641              
  Lines       63476    63477       +1     
  Branches     6444     6445       +1     
==========================================
  Hits        42227    42227              
  Misses      19585    19585              
- Partials     1664     1665       +1     
Flag Coverage Δ
javascript 51.28% <0.00%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
...frontend/src/SqlLab/components/ResultSet/index.tsx 50.49% <0.00%> (-0.25%) ⬇️
superset-frontend/src/SqlLab/reducers/sqlLab.js 33.15% <ø> (ø)

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 e89f0ab...329a7a6. Read the comment docs.

@rusackas
Copy link
Member

rusackas commented Mar 9, 2022

/testenv up

@github-actions
Copy link
Contributor

github-actions bot commented Mar 9, 2022

@rusackas Ephemeral environment spinning up at http://35.88.190.5:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.

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, and seems to work well in testing!

@rusackas rusackas merged commit bd76648 into apache:master Mar 9, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Mar 9, 2022

Ephemeral environment shutdown and build artifacts deleted.

villebro pushed a commit that referenced this pull request Apr 3, 2022
…imited by DISPLAY_MAX_ROW (#19054)

(cherry picked from commit bd76648)
@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/S 🍒 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.

6 participants