Allow user to customize query cost estimate#8470
Merged
betodealmeida merged 3 commits intoapache:masterfrom Nov 4, 2019
Merged
Allow user to customize query cost estimate#8470betodealmeida merged 3 commits intoapache:masterfrom
betodealmeida merged 3 commits intoapache:masterfrom
Conversation
etr2460
reviewed
Oct 29, 2019
docs/sqllab.rst
Outdated
|
|
||
| .. code-block:: python | ||
|
|
||
| def presto_query_cost_formatter(result): |
Member
There was a problem hiding this comment.
could we add a type to this so that people know what valid params there are? Or add that in a comment somewhere?
Member
Author
There was a problem hiding this comment.
Done! Sorry, I'm still not fully used to types in Python, and I keep forgetting them. :-P
Codecov Report
@@ Coverage Diff @@
## master #8470 +/- ##
==========================================
+ Coverage 66.41% 66.51% +0.09%
==========================================
Files 449 449
Lines 22567 22607 +40
Branches 2367 2367
==========================================
+ Hits 14987 15036 +49
+ Misses 7442 7433 -9
Partials 138 138
Continue to review full report at Codecov.
|
12 tasks
graceguo-supercat
pushed a commit
that referenced
this pull request
Nov 13, 2019
* Allow user to customize query estimate * Add docs; run black * Update docs with types
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CATEGORY
Choose one
SUMMARY
#8172 introduced the ability to estimate query costs before running them. Currently, this is supported by Presto, and it returns a relative CPU and network cost.
Ideally, we want to show the cost as dollars, time or percentile, instead of showing relative costs. Since the relationship between the relative cost and the actual cost varies from infrastructure to infrastructure, we need to provide users a way of customizing the query cost estimate.
Here's a hypothetical example where we use a coefficient to compute the query cost in dollars based on CPU and network cost:
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TEST PLAN
ADDITIONAL INFORMATION
REVIEWERS
@khtruong