Skip to content

fix(sqllab): missing estimate action button#40101

Merged
justinpark merged 1 commit into
apache:masterfrom
justinpark:fix--missing-estimate-button
May 14, 2026
Merged

fix(sqllab): missing estimate action button#40101
justinpark merged 1 commit into
apache:masterfrom
justinpark:fix--missing-estimate-button

Conversation

@justinpark
Copy link
Copy Markdown
Member

SUMMARY

Fixes a bug where the Estimate Query Cost button was missing in SQL Lab.

Two issues were causing the button to not appear:

  1. Backend: allows_cost_estimate was missing from DATABASE_KEYS in superset/sqllab/utils.py. This key is used when serializing database metadata to the frontend, so its absence meant the frontend never received the flag indicating a database supports cost estimation — causing the button to be hidden.
  2. Frontend: The EstimateQueryCostButton was using color="primary" with variant="text", which rendered the button as same as other sibling buttons.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before:

Screenshot 2026-05-13 at 5 36 29 PM

After:

Screenshot 2026-05-13 at 5 42 57 PM

TESTING INSTRUCTIONS

  1. Connect to a database that supports cost estimation (e.g., BigQuery, Presto/Trino)
  2. Open SQL Lab and write a query
  3. Verify the Estimate button appears in the toolbar
  4. Click it and confirm the cost estimate modal opens correctly

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

@dosubot dosubot Bot added change:backend Requires changing the backend change:frontend Requires changing the frontend sqllab Namespace | Anything related to the SQL Lab labels May 14, 2026
@bito-code-review
Copy link
Copy Markdown
Contributor

bito-code-review Bot commented May 14, 2026

Code Review Agent Run #6f39af

Actionable Suggestions - 0
Review Details
  • Files reviewed - 2 · Commit Range: 44d5336..44d5336
    • superset-frontend/src/SqlLab/components/EstimateQueryCostButton/index.tsx
    • superset/sqllab/utils.py
  • Files skipped - 0
  • Tools
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful
    • MyPy (Static Code Analysis) - ✔︎ Successful
    • Astral Ruff (Static Code Analysis) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers a full AI review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at evan@preset.io.

Documentation & Help

AI Code Review powered by Bito Logo

@codecov
Copy link
Copy Markdown

codecov Bot commented May 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.14%. Comparing base (6769796) to head (44d5336).

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #40101   +/-   ##
=======================================
  Coverage   64.14%   64.14%           
=======================================
  Files        2590     2590           
  Lines      138030   138030           
  Branches    32019    32019           
=======================================
+ Hits        88538    88545    +7     
+ Misses      47973    47966    -7     
  Partials     1519     1519           
Flag Coverage Δ
hive 39.44% <ø> (ø)
javascript 67.00% <ø> (+<0.01%) ⬆️
mysql 59.14% <ø> (ø)
postgres 59.21% <ø> (ø)
presto 41.13% <ø> (ø)
python 60.65% <ø> (ø)
sqlite 58.85% <ø> (ø)
unit 100.00% <ø> (ø)

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

☔ View full report in Codecov by Sentry.
📢 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.

@justinpark justinpark merged commit 2b71d96 into apache:master May 14, 2026
89 of 92 checks passed
michael-s-molina pushed a commit that referenced this pull request May 15, 2026
sha174n pushed a commit to sha174n/superset that referenced this pull request May 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

change:backend Requires changing the backend change:frontend Requires changing the frontend size/XS sqllab Namespace | Anything related to the SQL Lab

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants