Open LeonidChistov opened 4 days ago
@LeonidChistov the existing UI logic is to display the plan tree as a DAG graph. As you mentioned, showing the operators that are not in the original plan would help the analysis. I suggest you try to add those operator nodes to the graph and see what it looks like. I don't think it would break anything. FYI, the existing code does parse the whole list of the operatorSummaries
here.
Presto UI Stage Performance tab does not show operators which refer to plan nodes which were created on worker side during plan rewriting and are not present in original plan.
Example of code that does plan rewrite on worker side: https://github.com/prestodb/presto/blob/360bf94c7bccb4c9a24517676234dd54f7681baf/presto-native-execution/presto_cpp/main/types/PrestoToVeloxQueryPlan.cpp#L423
Here the new plan node is created.
Your Environment
October 11
Presto codebase snapshotExpected Behavior
All operators present in
latestAttemptExecutionInfo.stats.operatorSummaries
section need to be visible in UI to allow performance analysis.Current Behavior
Only operators that have
planNodeId
set to id of plan node present in the original query plan are shown in Stage Performance tab.It can be seen that this is due to Presto UI implementation that considers for rendering only operators with plan nodes ids from the original plan:
https://github.com/prestodb/presto/blob/e51c7939ed8f6e8f6b16fcf01f1e6d70a455ae92/presto-ui/src/components/QueryStageView.jsx#L364
Possible Solution
Simplest solution would be to change Presto UI logic to use only
operatorSummaries
section for pipelines rendering and avoid referring to query pan.In this case operator ids will be used to determine order of operators in the pipeline.
It is not clear though, why this approach was not initially implemented and whether this change may break anything,
Steps to Reproduce
Problem was reproduced when running TPCH Q1 with Hive connector.
Relevant fragment of execution JSON dump: https://pastebin.com/J9vZjGmk
Here FilterProject operator with plan node id
442.0
is present:while in the original plan there is only a node with id
442
:Screenshots (if appropriate)