Skip to content

fix(sqllab): paginate dataset picker - #46571

Open
dmunozv04 wants to merge 1 commit into
apache:masterfrom
dmunozv04:fix-sqllab-dataset-picker-pagination
Open

dmunozv04 wants to merge 1 commit into
apache:masterfrom
dmunozv04:fix-sqllab-dataset-picker-pagination

Conversation

@dmunozv04

Copy link
Copy Markdown
Contributor

SUMMARY

The dataset picker in SQL Lab’s Overwrite existing dialog ignored pagination arguments. The dataset API only returned the first 20 matching datasets on every request, and didn't load more on scroll.

This PR fixes it by passing page and page_size with the dataset list request and also adds a regression test that fails without the fix applied.

This issue is somewhat similar to #46569, although that one was only missing page_size.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

BEFORE: only 20 datasets load

before.mp4

AFTER: all datasets load, 100 on load and 100 more on demand when scrolling

after.mp4

TESTING INSTRUCTIONS

  1. Create/have more than 100 datasets
  2. In SQL Lab, run a query and select Save dataset
  3. Select Overwrite existing and open the Existing dataset picker with an empty search
  4. Scroll through the results and confirm that the picker loads the next page and lets you select a dataset from it.

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

@codeant-ai-for-open-source

codeant-ai-for-open-source Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

CodeAnt  CodeAnt PR Risk

🟢  Low Risk

  • The PR appears safe to merge; no actionable issues were identified in the review.

Assessed commit: a5bdda653764

@rusackas
rusackas requested a review from sha174n November 28, 2026 00:01
@dmunozv04
dmunozv04 force-pushed the fix-sqllab-dataset-picker-pagination branch from d645d23 to a5bdda6 Compare November 28, 2026 10:33
@codecov

codecov Bot commented Nov 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.41%. Comparing base (a6662b6) to head (a5bdda6).

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #46571      +/-   ##
==========================================
- Coverage   86.42%   86.41%   -0.01%     
==========================================
  Files        3183     3183              
  Lines      222606   222606              
  Branches    52996    52996              
==========================================
- Hits       192378   192376       -2     
- Misses      26758    26760       +2     
  Partials     3470     3470              
Flag Coverage Δ
javascript 83.41% <100.00%> (-0.01%) ⬇️

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

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant