-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Support format arguments in EXPLAIN ANALYZE #22733
base: master
Are you sure you want to change the base?
Support format arguments in EXPLAIN ANALYZE #22733
Conversation
b760bb9
to
78d8af9
Compare
78d8af9
to
4774032
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! (docs)
Pull branch, local docs build, looks good. Thanks!
Suggest revising the release note entry following the Order of changes in the Release Notes Guidelines, also add a link to the existing documentation (I tested this link in a local build):
|
case GRAPHVIZ: | ||
plan = graphvizDistributedPlan(queryInfo.getOutputStage().get().getSubStages().get(0), functionAndTypeManager, operatorContext.getSession()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we are not changing the Graphviz output, should we skip supporting EXPLAIN ANALYZE (FORMAT GRAPHIZ)
? (the output is same as EXPLAIN (FORMAT GRAPHIZ)
)
IMO, it will only add to confusion for users
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your opinion on this one. I had a similar thought but decided to just include it anyways. However, if you think it is confusing I will remove support for it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, lets skip it for now. We can enhance Graphviz output in a different PR (if there's interest) and add it back
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
naive question - why is it hard to add execution stats to graphviz?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it's particularly difficult, but I'm not familiar with the graphviz format. It would just require some more time+effort to make it work properly
presto-main/src/main/java/com/facebook/presto/sql/planner/plan/ExplainAnalyzeNode.java
Outdated
Show resolved
Hide resolved
presto-main/src/main/java/com/facebook/presto/sql/planner/LogicalPlanner.java
Outdated
Show resolved
Hide resolved
case GRAPHVIZ: | ||
plan = graphvizDistributedPlan(queryInfo.getOutputStage().get().getSubStages().get(0), functionAndTypeManager, operatorContext.getSession()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
naive question - why is it hard to add execution stats to graphviz?
4774032
to
6d1b2fd
Compare
6d1b2fd
to
ddf57b1
Compare
This change adds two features: 1. Support for `format JSON` in EXPLAIN ANALYZE 2. Adds supoprt for a `stats` field in each plan node representation This allows the user to get a computer-friendly representation of the plan with the statistics. This can be useful for visualization
ddf57b1
to
741acd4
Compare
Description
This change adds two features:
format <X>
in EXPLAIN ANALYZEstats
field in each plan node representationThis allows the user to get a computer-friendly representation of the plan with the statistics. This can be useful for visualization or as input to other systems for plan node-level performance analysis.
Motivation and Context
Impact
PlanNodeStats.java
Test Plan
Contributor checklist
Release Notes