From 832c0fa3a952d53d99f71005ca60ecf161a44b38 Mon Sep 17 00:00:00 2001 From: xudong963 Date: Fri, 6 Sep 2024 10:52:20 +0800 Subject: [PATCH] chore: add join type for explain analyze partial --- src/query/sql/src/executor/format.rs | 2 +- .../standalone/explain/explain_analyze_partial.test | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/query/sql/src/executor/format.rs b/src/query/sql/src/executor/format.rs index 992d7481ff68..1e15d2f7e961 100644 --- a/src/query/sql/src/executor/format.rs +++ b/src/query/sql/src/executor/format.rs @@ -271,7 +271,7 @@ pub fn format_partial_tree( children.push(probe_child); Ok(FormatTreeNode::with_children( - "HashJoin".to_string(), + format!("HashJoin: {}", plan.join_type), children, )) } diff --git a/tests/sqllogictests/suites/mode/standalone/explain/explain_analyze_partial.test b/tests/sqllogictests/suites/mode/standalone/explain/explain_analyze_partial.test index ead3d8ad689b..fa80fddaa6fe 100644 --- a/tests/sqllogictests/suites/mode/standalone/explain/explain_analyze_partial.test +++ b/tests/sqllogictests/suites/mode/standalone/explain/explain_analyze_partial.test @@ -7,7 +7,7 @@ create or replace table t1 as select number as a from numbers(10); query T explain analyze partial select * from t1 join t2 on t1.a = t2.b; ---- -HashJoin +HashJoin: INNER ├── estimated rows: 10.00 ├── output rows: 10 ├── TableScan @@ -36,7 +36,7 @@ explain analyze partial select * from t1 join t2 on t1.a = t2.b union all selec ---- UnionAll ├── Left -│ └── HashJoin +│ └── HashJoin: INNER │ ├── estimated rows: 10.00 │ ├── output rows: 10 │ ├── TableScan @@ -48,7 +48,7 @@ UnionAll │ ├── estimated rows: 10.00 │ └── output rows: 10 └── Right - └── HashJoin + └── HashJoin: INNER ├── estimated rows: 10.00 ├── output rows: 10 ├── TableScan @@ -64,7 +64,7 @@ UnionAll query T explain analyze partial select * from t1 join t2 on t1.a = t2.b where t1.a > 1; ---- -HashJoin +HashJoin: INNER ├── estimated rows: 8.00 ├── output rows: 8 ├── Filter @@ -89,7 +89,7 @@ HashJoin query T explain analyze partial select * from t1 join t2 on t1.a = t2.b where t1.a > 10; ---- -HashJoin +HashJoin: INNER ├── estimated rows: 0.00 ├── Filter │ ├── filters: [t2.b (#1) > 10]