Remove allFragments from PlanPrinter#formatFragment#14924
Merged
wenleix merged 1 commit intoprestodb:masterfrom Jul 30, 2020
Merged
Remove allFragments from PlanPrinter#formatFragment#14924wenleix merged 1 commit intoprestodb:masterfrom
wenleix merged 1 commit intoprestodb:masterfrom
Conversation
ca3955a to
f975f3f
Compare
Contributor
Author
|
Travis is green! @rschlussel : does that mean we can remove |
arhimondr
approved these changes
Jul 30, 2020
Contributor
|
Can you spot check a plan for EXPLAIN (TYPE DISTRIBUTED) with multiple fragments to see that the stats look correct? Otherwise looks good, thanks! |
Contributor
Author
|
@rschlussel : Yeah, -- HiveQueryRunner, hive.tpch
SELECT
l.shipmode,
sum(case
when o.orderpriority = '1-URGENT'
OR o.orderpriority = '2-HIGH'
then 1
else 0
end) as high_line_count,
sum(case
when o.orderpriority <> '1-URGENT'
AND o.orderpriority <> '2-HIGH'
then 1
else 0
end) AS low_line_count
FROM
orders o,
lineitem l
WHERE
o.orderkey = l.orderkey
AND l.shipmode in ('MAIL', 'SHIP')
AND l.commitdate < l.receiptdate
AND l.shipdate < l.commitdate
AND l.receiptdate >= date '1994-01-01'
AND l.receiptdate < date '1994-01-01' + interval '1' year
GROUP BY
l.shipmode |
Contributor
Author
|
My bad, forgot to amend the commit message before merge (only update the PR title :( ) |
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.
When stats and cost is displayed in #11268,
allFragmentsis introduced toPlanPrinter#formatFragmentsinceFragmentedPlanStatsCalculatorandFragmentedPlanCostCalculatorneeds all fragments. It also changes theTypeProviderto use all variables in all fragments, looks like this change is by accident, see discussions in https://github.com/prestodb/presto/pull/11268/files#r462651639Fragment stats and cost are now precomputed and stored in
PlanFragmentthrough #11511 . As a result,allFragmentsis not required any more byPlanPrinter#formatFragment.cc @rschlussel
Test plan - Travis passed. Also spot check a plan for EXPLAIN (TYPE DISTRIBUTED) with multiple fragments to see that the stats look correct.