This is an automated email from the ASF dual-hosted git repository. stigahuang pushed a commit to branch branch-4.1.2 in repository https://gitbox.apache.org/repos/asf/impala.git
commit 588719d321bda8bc54f50fcbf0234986a0e28c4f Author: Kurt Deschler <[email protected]> AuthorDate: Mon Jan 23 18:57:37 2023 -0500 IMPALA-11857: Connect join build fragment to join in graphical plan When support was added for join build sink, the plan JSON and plan rendering logic were not updated to handle the new sink type. As a result, the linkage from the join build fragment to its corresponding join node were not expressed in the JSON and build fragments nodes were rendered as orphaned. This change adds a new JSON join_build_target field to join build fragments and connects the build fragment to the join with a green dashed line similar to the red dashed line used for data sender fragments. Also changed the SVG fill type to 'none' for exchange edges to avoid rendering a black triangle if the right child was an exchange as in the join build case. Testing: - Manual testing with TPCH queries and reviewing rendered plan diagrams Change-Id: I80af977e5c5e869268d3ee68fafe541adadc239d Reviewed-on: http://gerrit.cloudera.org:8080/19437 Reviewed-by: Impala Public Jenkins <[email protected]> Tested-by: Impala Public Jenkins <[email protected]> --- be/src/service/impala-http-handler.cc | 4 ++++ www/query_plan.tmpl | 13 ++++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/be/src/service/impala-http-handler.cc b/be/src/service/impala-http-handler.cc index caffd7b9b..fabb8f4b5 100644 --- a/be/src/service/impala-http-handler.cc +++ b/be/src/service/impala-http-handler.cc @@ -820,6 +820,10 @@ void PlanToJson(const vector<TPlanFragment>& fragments, const TExecSummary& summ Value target(label_map[sink.stream_sink.dest_node_id].c_str(), document->GetAllocator()); plan_fragment.AddMember("data_stream_target", target, document->GetAllocator()); + } else if (sink.__isset.join_build_sink) { + Value target(label_map[sink.join_build_sink.dest_node_id].c_str(), + document->GetAllocator()); + plan_fragment.AddMember("join_build_target", target, document->GetAllocator()); } } nodes.PushBack(plan_fragment, document->GetAllocator()); diff --git a/www/query_plan.tmpl b/www/query_plan.tmpl index 744eb69d9..ed2373fcc 100644 --- a/www/query_plan.tmpl +++ b/www/query_plan.tmpl @@ -115,13 +115,20 @@ function build(node, parent, edges, states, colour_idx, max_node_time) { edges.push({ start: node["label"], end: parent, style: { label: label_val }}); } - // Add an inter-fragment edge. We use a red dashed line to show that rows are crossing - // the fragment boundary. + // Add an inter-fragment edges if (node["data_stream_target"]) { + // Use a red dashed line to show a streaming data boundary edges.push({ "start": node["label"], "end": node["data_stream_target"], "style": { label: "" + node["output_card"].toLocaleString(), - style: "stroke: #f66; stroke-dasharray: 5, 5;"}}); + style: "fill:none; stroke: #c00000; stroke-dasharray: 5, 5;"}}); + } else if (node["join_build_target"]) { + // Use a green dashed line to show a join build boundary + edges.push({ "start": node["label"], + "end": node["join_build_target"], + "style": { label: "" + node["output_card"].toLocaleString(), + style: "fill: none; stroke: #00c000; stroke-dasharray: 5, 5;"} +}); } max_node_time = Math.max(node["max_time_val"], max_node_time) for (var i = 0; i < node["children"].length; ++i) {
