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

Pass full response to query_cost_formatter #8652

Merged
merged 3 commits into from
Nov 26, 2019
Merged

Pass full response to query_cost_formatter #8652

merged 3 commits into from
Nov 26, 2019

Conversation

betodealmeida
Copy link
Member

CATEGORY

Choose one

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

SUMMARY

When estimating the cost of queries using Presto we currently pass only the actual estimate to query_cost_formatter. I modified it so it passes the full response from Presto, which allows us to log which table(s) and partition(s) are being queried.

Basically, instead of returning response["estimate"] this PR makes it return response, and the formatter will extract the estimate. Custom formatters defined in superset_config.py will have access to the full response, including inputTableColumnInfos.

TEST PLAN

Added unit test for query_cost_formatter, and tested locally.

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

@khtruong @DiggidyDave

@codecov-io
Copy link

codecov-io commented Nov 26, 2019

Codecov Report

Merging #8652 into master will decrease coverage by 0.04%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #8652      +/-   ##
==========================================
- Coverage   65.76%   65.71%   -0.05%     
==========================================
  Files         482      482              
  Lines       23824    23906      +82     
  Branches     2594     2617      +23     
==========================================
+ Hits        15667    15710      +43     
- Misses       7984     8023      +39     
  Partials      173      173
Impacted Files Coverage Δ
superset/db_engine_specs/presto.py 22.58% <0%> (-0.06%) ⬇️
...ssets/src/dashboard/util/activeDashboardFilters.js 93.58% <0%> (+3.2%) ⬆️
.../assets/src/visualizations/FilterBox/FilterBox.jsx 10.36% <0%> (+4.43%) ⬆️
...src/dashboard/util/getFilterConfigsFromFormdata.js 53.33% <0%> (+10.47%) ⬆️

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 acf0753...42bc213. Read the comment docs.

@betodealmeida betodealmeida merged commit 5f4e3ad into master Nov 26, 2019
@amitmiran137 amitmiran137 deleted the VIZ-1202 branch March 29, 2021 18:09
@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.

4 participants