From a1e5a41745d86ec56a8700f32142040ac581c3c0 Mon Sep 17 00:00:00 2001 From: Alan Tang Date: Sat, 8 Mar 2025 12:29:47 +0800 Subject: [PATCH 1/5] feat: implement tree explain for ProjectionExec Signed-off-by: Alan Tang --- datafusion/physical-plan/src/projection.rs | 14 +++++++++- .../sqllogictest/test_files/explain_tree.slt | 26 +++++++++++++++++++ 2 files changed, 39 insertions(+), 1 deletion(-) diff --git a/datafusion/physical-plan/src/projection.rs b/datafusion/physical-plan/src/projection.rs index 8ff3824eff4c..cd998621124c 100644 --- a/datafusion/physical-plan/src/projection.rs +++ b/datafusion/physical-plan/src/projection.rs @@ -169,7 +169,19 @@ impl DisplayAs for ProjectionExec { } DisplayFormatType::TreeRender => { // TODO: collect info - write!(f, "") + let expr: Vec = self + .expr + .iter() + .map(|(e, alias)| { + let e = e.to_string(); + if &e != alias { + format!("{e} as {alias}") + } else { + e + } + }) + .collect(); + write!(f, "ProjectionExec: expr=[{}]", expr.join(", ")) } } } diff --git a/datafusion/sqllogictest/test_files/explain_tree.slt b/datafusion/sqllogictest/test_files/explain_tree.slt index fb34d3ec1cc3..7697ccf9045a 100644 --- a/datafusion/sqllogictest/test_files/explain_tree.slt +++ b/datafusion/sqllogictest/test_files/explain_tree.slt @@ -472,6 +472,32 @@ physical_plan 15)│ rows: 1 │ 16)└───────────────────────────┘ +# Query with projection on memory +query TT +explain SELECT int_col, bigint_col, int_col+bigint_col AS sum_col FROM table3; +---- +logical_plan +01)Projection: table3.int_col, table3.bigint_col, CAST(table3.int_col AS Int64) + table3.bigint_col AS sum_col +02)--TableScan: table3 projection=[int_col, bigint_col] +physical_plan +01)┌───────────────────────────┐ +02)│ ProjectionExec │ +03)│ -------------------- │ +04)│ ProjectionExec: expr: │ +05)│ [int_col@0 as int_col, │ +06)│ bigint_col@1 as │ +07)│ bigint_col, CAST │ +08)│ (int_col@0 AS Int64) + │ +09)│ bigint_col@1 as sum_col] │ +10)└─────────────┬─────────────┘ +11)┌─────────────┴─────────────┐ +12)│ DataSourceExec │ +13)│ -------------------- │ +14)│ bytes: 1560 │ +15)│ format: memory │ +16)│ rows: 1 │ +17)└───────────────────────────┘ + # Query with filter on json query TT explain SELECT int_col FROM table4 WHERE string_col != 'foo'; From 6bd76e63bd1a40b4ba6d6295f883e676c5d487ac Mon Sep 17 00:00:00 2001 From: Alan Tang Date: Sat, 8 Mar 2025 12:40:28 +0800 Subject: [PATCH 2/5] feat(test): support more tests Signed-off-by: Alan Tang --- .../sqllogictest/test_files/explain_tree.slt | 170 +++++++++++++++--- 1 file changed, 144 insertions(+), 26 deletions(-) diff --git a/datafusion/sqllogictest/test_files/explain_tree.slt b/datafusion/sqllogictest/test_files/explain_tree.slt index 7697ccf9045a..7e833ec0fe5a 100644 --- a/datafusion/sqllogictest/test_files/explain_tree.slt +++ b/datafusion/sqllogictest/test_files/explain_tree.slt @@ -472,32 +472,6 @@ physical_plan 15)│ rows: 1 │ 16)└───────────────────────────┘ -# Query with projection on memory -query TT -explain SELECT int_col, bigint_col, int_col+bigint_col AS sum_col FROM table3; ----- -logical_plan -01)Projection: table3.int_col, table3.bigint_col, CAST(table3.int_col AS Int64) + table3.bigint_col AS sum_col -02)--TableScan: table3 projection=[int_col, bigint_col] -physical_plan -01)┌───────────────────────────┐ -02)│ ProjectionExec │ -03)│ -------------------- │ -04)│ ProjectionExec: expr: │ -05)│ [int_col@0 as int_col, │ -06)│ bigint_col@1 as │ -07)│ bigint_col, CAST │ -08)│ (int_col@0 AS Int64) + │ -09)│ bigint_col@1 as sum_col] │ -10)└─────────────┬─────────────┘ -11)┌─────────────┴─────────────┐ -12)│ DataSourceExec │ -13)│ -------------------- │ -14)│ bytes: 1560 │ -15)│ format: memory │ -16)│ rows: 1 │ -17)└───────────────────────────┘ - # Query with filter on json query TT explain SELECT int_col FROM table4 WHERE string_col != 'foo'; @@ -554,6 +528,150 @@ physical_plan 17)│ format: arrow │ 18)└───────────────────────────┘ + +# Query with projection on csv +query TT +explain SELECT int_col, bigint_col, int_col+bigint_col AS sum_col FROM table1; +---- +logical_plan +01)Projection: table1.int_col, table1.bigint_col, CAST(table1.int_col AS Int64) + table1.bigint_col AS sum_col +02)--TableScan: table1 projection=[int_col, bigint_col] +physical_plan +01)┌───────────────────────────┐ +02)│ ProjectionExec │ +03)│ -------------------- │ +04)│ ProjectionExec: expr: │ +05)│ [int_col@0 as int_col, │ +06)│ bigint_col@1 as │ +07)│ bigint_col, CAST │ +08)│ (int_col@0 AS Int64) + │ +09)│ bigint_col@1 as sum_col] │ +10)└─────────────┬─────────────┘ +11)┌─────────────┴─────────────┐ +12)│ RepartitionExec │ +13)└─────────────┬─────────────┘ +14)┌─────────────┴─────────────┐ +15)│ DataSourceExec │ +16)│ -------------------- │ +17)│ files: 1 │ +18)│ format: csv │ +19)└───────────────────────────┘ + + +# Query with projection on parquet +query TT +explain SELECT int_col, bigint_col, int_col+bigint_col AS sum_col FROM table2; +---- +logical_plan +01)Projection: table2.int_col, table2.bigint_col, CAST(table2.int_col AS Int64) + table2.bigint_col AS sum_col +02)--TableScan: table2 projection=[int_col, bigint_col] +physical_plan +01)┌───────────────────────────┐ +02)│ ProjectionExec │ +03)│ -------------------- │ +04)│ ProjectionExec: expr: │ +05)│ [int_col@0 as int_col, │ +06)│ bigint_col@1 as │ +07)│ bigint_col, CAST │ +08)│ (int_col@0 AS Int64) + │ +09)│ bigint_col@1 as sum_col] │ +10)└─────────────┬─────────────┘ +11)┌─────────────┴─────────────┐ +12)│ RepartitionExec │ +13)└─────────────┬─────────────┘ +14)┌─────────────┴─────────────┐ +15)│ DataSourceExec │ +16)│ -------------------- │ +17)│ files: 1 │ +18)│ format: parquet │ +19)└───────────────────────────┘ + + +# Query with projection on memory +query TT +explain SELECT int_col, bigint_col, int_col+bigint_col AS sum_col FROM table3; +---- +logical_plan +01)Projection: table3.int_col, table3.bigint_col, CAST(table3.int_col AS Int64) + table3.bigint_col AS sum_col +02)--TableScan: table3 projection=[int_col, bigint_col] +physical_plan +01)┌───────────────────────────┐ +02)│ ProjectionExec │ +03)│ -------------------- │ +04)│ ProjectionExec: expr: │ +05)│ [int_col@0 as int_col, │ +06)│ bigint_col@1 as │ +07)│ bigint_col, CAST │ +08)│ (int_col@0 AS Int64) + │ +09)│ bigint_col@1 as sum_col] │ +10)└─────────────┬─────────────┘ +11)┌─────────────┴─────────────┐ +12)│ DataSourceExec │ +13)│ -------------------- │ +14)│ bytes: 1560 │ +15)│ format: memory │ +16)│ rows: 1 │ +17)└───────────────────────────┘ + + + +# Query with projection on json +query TT +explain SELECT int_col, bigint_col, int_col+bigint_col AS sum_col FROM table4; +---- +logical_plan +01)Projection: table4.int_col, table4.bigint_col, table4.int_col + table4.bigint_col AS sum_col +02)--TableScan: table4 projection=[bigint_col, int_col] +physical_plan +01)┌───────────────────────────┐ +02)│ ProjectionExec │ +03)│ -------------------- │ +04)│ ProjectionExec: expr: │ +05)│ [int_col@1 as int_col, │ +06)│ bigint_col@0 as │ +07)│ bigint_col, int_col │ +08)│ @1 + bigint_col@0 as │ +09)│ sum_col] │ +10)└─────────────┬─────────────┘ +11)┌─────────────┴─────────────┐ +12)│ RepartitionExec │ +13)└─────────────┬─────────────┘ +14)┌─────────────┴─────────────┐ +15)│ DataSourceExec │ +16)│ -------------------- │ +17)│ files: 1 │ +18)│ format: json │ +19)└───────────────────────────┘ + + +# Query with projection on arrow +query TT +explain SELECT int_col, bigint_col, int_col+bigint_col AS sum_col FROM table5; +---- +logical_plan +01)Projection: table5.int_col, table5.bigint_col, CAST(table5.int_col AS Int64) + table5.bigint_col AS sum_col +02)--TableScan: table5 projection=[int_col, bigint_col] +physical_plan +01)┌───────────────────────────┐ +02)│ ProjectionExec │ +03)│ -------------------- │ +04)│ ProjectionExec: expr: │ +05)│ [int_col@0 as int_col, │ +06)│ bigint_col@1 as │ +07)│ bigint_col, CAST │ +08)│ (int_col@0 AS Int64) + │ +09)│ bigint_col@1 as sum_col] │ +10)└─────────────┬─────────────┘ +11)┌─────────────┴─────────────┐ +12)│ RepartitionExec │ +13)└─────────────┬─────────────┘ +14)┌─────────────┴─────────────┐ +15)│ DataSourceExec │ +16)│ -------------------- │ +17)│ files: 1 │ +18)│ format: arrow │ +19)└───────────────────────────┘ + # Query with hash join. query TT explain select * from table1 inner join table2 on table1.int_col = table2.int_col and table1.string_col = table2.string_col; From d986b43d9f77a1261aedcd2b6159a8bd1043fc4d Mon Sep 17 00:00:00 2001 From: Alan Tang Date: Sat, 8 Mar 2025 14:12:15 +0800 Subject: [PATCH 3/5] chore(explain): Reduce redundant output Signed-off-by: Alan Tang --- datafusion/physical-plan/src/projection.rs | 40 ++++++------------- .../sqllogictest/test_files/explain_tree.slt | 10 ++--- 2 files changed, 18 insertions(+), 32 deletions(-) diff --git a/datafusion/physical-plan/src/projection.rs b/datafusion/physical-plan/src/projection.rs index cd998621124c..22d159eb3a8d 100644 --- a/datafusion/physical-plan/src/projection.rs +++ b/datafusion/physical-plan/src/projection.rs @@ -150,38 +150,24 @@ impl DisplayAs for ProjectionExec { t: DisplayFormatType, f: &mut std::fmt::Formatter, ) -> std::fmt::Result { + let expr: Vec = self + .expr + .iter() + .map(|(e, alias)| { + let e = e.to_string(); + if &e != alias { + format!("{e} as {alias}") + } else { + e + } + }) + .collect(); match t { DisplayFormatType::Default | DisplayFormatType::Verbose => { - let expr: Vec = self - .expr - .iter() - .map(|(e, alias)| { - let e = e.to_string(); - if &e != alias { - format!("{e} as {alias}") - } else { - e - } - }) - .collect(); - write!(f, "ProjectionExec: expr=[{}]", expr.join(", ")) } DisplayFormatType::TreeRender => { - // TODO: collect info - let expr: Vec = self - .expr - .iter() - .map(|(e, alias)| { - let e = e.to_string(); - if &e != alias { - format!("{e} as {alias}") - } else { - e - } - }) - .collect(); - write!(f, "ProjectionExec: expr=[{}]", expr.join(", ")) + write!(f, "expr=[{}]", expr.join(", ")) } } } diff --git a/datafusion/sqllogictest/test_files/explain_tree.slt b/datafusion/sqllogictest/test_files/explain_tree.slt index 7e833ec0fe5a..33a05f4b0b79 100644 --- a/datafusion/sqllogictest/test_files/explain_tree.slt +++ b/datafusion/sqllogictest/test_files/explain_tree.slt @@ -540,7 +540,7 @@ physical_plan 01)┌───────────────────────────┐ 02)│ ProjectionExec │ 03)│ -------------------- │ -04)│ ProjectionExec: expr: │ +04)│ expr: │ 05)│ [int_col@0 as int_col, │ 06)│ bigint_col@1 as │ 07)│ bigint_col, CAST │ @@ -569,7 +569,7 @@ physical_plan 01)┌───────────────────────────┐ 02)│ ProjectionExec │ 03)│ -------------------- │ -04)│ ProjectionExec: expr: │ +04)│ expr: │ 05)│ [int_col@0 as int_col, │ 06)│ bigint_col@1 as │ 07)│ bigint_col, CAST │ @@ -598,7 +598,7 @@ physical_plan 01)┌───────────────────────────┐ 02)│ ProjectionExec │ 03)│ -------------------- │ -04)│ ProjectionExec: expr: │ +04)│ expr: │ 05)│ [int_col@0 as int_col, │ 06)│ bigint_col@1 as │ 07)│ bigint_col, CAST │ @@ -626,7 +626,7 @@ physical_plan 01)┌───────────────────────────┐ 02)│ ProjectionExec │ 03)│ -------------------- │ -04)│ ProjectionExec: expr: │ +04)│ expr: │ 05)│ [int_col@1 as int_col, │ 06)│ bigint_col@0 as │ 07)│ bigint_col, int_col │ @@ -655,7 +655,7 @@ physical_plan 01)┌───────────────────────────┐ 02)│ ProjectionExec │ 03)│ -------------------- │ -04)│ ProjectionExec: expr: │ +04)│ expr: │ 05)│ [int_col@0 as int_col, │ 06)│ bigint_col@1 as │ 07)│ bigint_col, CAST │ From d83eff9e51c6d1587e6ddcff5f2e7cf00ce7db8f Mon Sep 17 00:00:00 2001 From: Andrew Lamb Date: Sat, 8 Mar 2025 07:45:37 -0500 Subject: [PATCH 4/5] Propose a different projection formatting --- datafusion/physical-plan/src/projection.rs | 35 ++-- .../sqllogictest/test_files/explain_tree.slt | 165 +++++++++--------- 2 files changed, 109 insertions(+), 91 deletions(-) diff --git a/datafusion/physical-plan/src/projection.rs b/datafusion/physical-plan/src/projection.rs index 22d159eb3a8d..3f901311a053 100644 --- a/datafusion/physical-plan/src/projection.rs +++ b/datafusion/physical-plan/src/projection.rs @@ -150,24 +150,33 @@ impl DisplayAs for ProjectionExec { t: DisplayFormatType, f: &mut std::fmt::Formatter, ) -> std::fmt::Result { - let expr: Vec = self - .expr - .iter() - .map(|(e, alias)| { - let e = e.to_string(); - if &e != alias { - format!("{e} as {alias}") - } else { - e - } - }) - .collect(); match t { DisplayFormatType::Default | DisplayFormatType::Verbose => { + let expr: Vec = self + .expr + .iter() + .map(|(e, alias)| { + let e = e.to_string(); + if &e != alias { + format!("{e} as {alias}") + } else { + e + } + }) + .collect(); + write!(f, "ProjectionExec: expr=[{}]", expr.join(", ")) } DisplayFormatType::TreeRender => { - write!(f, "expr=[{}]", expr.join(", ")) + for (i, (e, alias)) in self.expr().iter().enumerate() { + let e = e.to_string(); + if &e == alias { + writeln!(f, "expr{i}={e}")?; + } else { + writeln!(f, "{alias}={e}")?; + } + } + Ok(()) } } } diff --git a/datafusion/sqllogictest/test_files/explain_tree.slt b/datafusion/sqllogictest/test_files/explain_tree.slt index 33a05f4b0b79..6ef6d811b671 100644 --- a/datafusion/sqllogictest/test_files/explain_tree.slt +++ b/datafusion/sqllogictest/test_files/explain_tree.slt @@ -540,22 +540,24 @@ physical_plan 01)┌───────────────────────────┐ 02)│ ProjectionExec │ 03)│ -------------------- │ -04)│ expr: │ -05)│ [int_col@0 as int_col, │ -06)│ bigint_col@1 as │ -07)│ bigint_col, CAST │ -08)│ (int_col@0 AS Int64) + │ -09)│ bigint_col@1 as sum_col] │ -10)└─────────────┬─────────────┘ -11)┌─────────────┴─────────────┐ -12)│ RepartitionExec │ -13)└─────────────┬─────────────┘ -14)┌─────────────┴─────────────┐ -15)│ DataSourceExec │ -16)│ -------------------- │ -17)│ files: 1 │ -18)│ format: csv │ -19)└───────────────────────────┘ +04)│ bigint_col: │ +05)│ bigint_col@1 │ +06)│ │ +07)│ int_col: int_col@0 │ +08)│ │ +09)│ sum_col: │ +10)│ CAST(int_col@0 AS Int64) +│ +11)│ bigint_col@1 │ +12)└─────────────┬─────────────┘ +13)┌─────────────┴─────────────┐ +14)│ RepartitionExec │ +15)└─────────────┬─────────────┘ +16)┌─────────────┴─────────────┐ +17)│ DataSourceExec │ +18)│ -------------------- │ +19)│ files: 1 │ +20)│ format: csv │ +21)└───────────────────────────┘ # Query with projection on parquet @@ -569,22 +571,24 @@ physical_plan 01)┌───────────────────────────┐ 02)│ ProjectionExec │ 03)│ -------------------- │ -04)│ expr: │ -05)│ [int_col@0 as int_col, │ -06)│ bigint_col@1 as │ -07)│ bigint_col, CAST │ -08)│ (int_col@0 AS Int64) + │ -09)│ bigint_col@1 as sum_col] │ -10)└─────────────┬─────────────┘ -11)┌─────────────┴─────────────┐ -12)│ RepartitionExec │ -13)└─────────────┬─────────────┘ -14)┌─────────────┴─────────────┐ -15)│ DataSourceExec │ -16)│ -------------------- │ -17)│ files: 1 │ -18)│ format: parquet │ -19)└───────────────────────────┘ +04)│ bigint_col: │ +05)│ bigint_col@1 │ +06)│ │ +07)│ int_col: int_col@0 │ +08)│ │ +09)│ sum_col: │ +10)│ CAST(int_col@0 AS Int64) +│ +11)│ bigint_col@1 │ +12)└─────────────┬─────────────┘ +13)┌─────────────┴─────────────┐ +14)│ RepartitionExec │ +15)└─────────────┬─────────────┘ +16)┌─────────────┴─────────────┐ +17)│ DataSourceExec │ +18)│ -------------------- │ +19)│ files: 1 │ +20)│ format: parquet │ +21)└───────────────────────────┘ # Query with projection on memory @@ -598,20 +602,22 @@ physical_plan 01)┌───────────────────────────┐ 02)│ ProjectionExec │ 03)│ -------------------- │ -04)│ expr: │ -05)│ [int_col@0 as int_col, │ -06)│ bigint_col@1 as │ -07)│ bigint_col, CAST │ -08)│ (int_col@0 AS Int64) + │ -09)│ bigint_col@1 as sum_col] │ -10)└─────────────┬─────────────┘ -11)┌─────────────┴─────────────┐ -12)│ DataSourceExec │ -13)│ -------------------- │ -14)│ bytes: 1560 │ -15)│ format: memory │ -16)│ rows: 1 │ -17)└───────────────────────────┘ +04)│ bigint_col: │ +05)│ bigint_col@1 │ +06)│ │ +07)│ int_col: int_col@0 │ +08)│ │ +09)│ sum_col: │ +10)│ CAST(int_col@0 AS Int64) +│ +11)│ bigint_col@1 │ +12)└─────────────┬─────────────┘ +13)┌─────────────┴─────────────┐ +14)│ DataSourceExec │ +15)│ -------------------- │ +16)│ bytes: 1560 │ +17)│ format: memory │ +18)│ rows: 1 │ +19)└───────────────────────────┘ @@ -626,22 +632,23 @@ physical_plan 01)┌───────────────────────────┐ 02)│ ProjectionExec │ 03)│ -------------------- │ -04)│ expr: │ -05)│ [int_col@1 as int_col, │ -06)│ bigint_col@0 as │ -07)│ bigint_col, int_col │ -08)│ @1 + bigint_col@0 as │ -09)│ sum_col] │ -10)└─────────────┬─────────────┘ -11)┌─────────────┴─────────────┐ -12)│ RepartitionExec │ -13)└─────────────┬─────────────┘ -14)┌─────────────┴─────────────┐ -15)│ DataSourceExec │ -16)│ -------------------- │ -17)│ files: 1 │ -18)│ format: json │ -19)└───────────────────────────┘ +04)│ bigint_col: │ +05)│ bigint_col@0 │ +06)│ │ +07)│ int_col: int_col@1 │ +08)│ │ +09)│ sum_col: │ +10)│ int_col@1 + bigint_col@0 │ +11)└─────────────┬─────────────┘ +12)┌─────────────┴─────────────┐ +13)│ RepartitionExec │ +14)└─────────────┬─────────────┘ +15)┌─────────────┴─────────────┐ +16)│ DataSourceExec │ +17)│ -------------------- │ +18)│ files: 1 │ +19)│ format: json │ +20)└───────────────────────────┘ # Query with projection on arrow @@ -655,22 +662,24 @@ physical_plan 01)┌───────────────────────────┐ 02)│ ProjectionExec │ 03)│ -------------------- │ -04)│ expr: │ -05)│ [int_col@0 as int_col, │ -06)│ bigint_col@1 as │ -07)│ bigint_col, CAST │ -08)│ (int_col@0 AS Int64) + │ -09)│ bigint_col@1 as sum_col] │ -10)└─────────────┬─────────────┘ -11)┌─────────────┴─────────────┐ -12)│ RepartitionExec │ -13)└─────────────┬─────────────┘ -14)┌─────────────┴─────────────┐ -15)│ DataSourceExec │ -16)│ -------------------- │ -17)│ files: 1 │ -18)│ format: arrow │ -19)└───────────────────────────┘ +04)│ bigint_col: │ +05)│ bigint_col@1 │ +06)│ │ +07)│ int_col: int_col@0 │ +08)│ │ +09)│ sum_col: │ +10)│ CAST(int_col@0 AS Int64) +│ +11)│ bigint_col@1 │ +12)└─────────────┬─────────────┘ +13)┌─────────────┴─────────────┐ +14)│ RepartitionExec │ +15)└─────────────┬─────────────┘ +16)┌─────────────┴─────────────┐ +17)│ DataSourceExec │ +18)│ -------------------- │ +19)│ files: 1 │ +20)│ format: arrow │ +21)└───────────────────────────┘ # Query with hash join. query TT From ac3644d79990bfcab8e51d60f5dec981c402dcf8 Mon Sep 17 00:00:00 2001 From: Alan Tang Date: Sun, 9 Mar 2025 18:58:27 +0800 Subject: [PATCH 5/5] feat: add project exec tree rendering for hash join --- .../sqllogictest/test_files/explain_tree.slt | 80 +++++++++++++------ 1 file changed, 54 insertions(+), 26 deletions(-) diff --git a/datafusion/sqllogictest/test_files/explain_tree.slt b/datafusion/sqllogictest/test_files/explain_tree.slt index 6ef6d811b671..c723cf3f1714 100644 --- a/datafusion/sqllogictest/test_files/explain_tree.slt +++ b/datafusion/sqllogictest/test_files/explain_tree.slt @@ -710,19 +710,33 @@ physical_plan 18)└─────────────┬─────────────┘└─────────────┬─────────────┘ 19)┌─────────────┴─────────────┐┌─────────────┴─────────────┐ 20)│ ProjectionExec ││ RepartitionExec │ -21)└─────────────┬─────────────┘└─────────────┬─────────────┘ -22)┌─────────────┴─────────────┐┌─────────────┴─────────────┐ -23)│ RepartitionExec ││ DataSourceExec │ -24)│ ││ -------------------- │ -25)│ ││ files: 1 │ -26)│ ││ format: parquet │ -27)└─────────────┬─────────────┘└───────────────────────────┘ -28)┌─────────────┴─────────────┐ -29)│ DataSourceExec │ -30)│ -------------------- │ -31)│ files: 1 │ -32)│ format: csv │ -33)└───────────────────────────┘ +21)│ -------------------- ││ │ +22)│ CAST(table1.string_col AS ││ │ +23)│ Utf8View): ││ │ +24)│ CAST(string_col@1 AS ││ │ +25)│ Utf8View) ││ │ +26)│ ││ │ +27)│ bigint_col: ││ │ +28)│ bigint_col@2 ││ │ +29)│ ││ │ +30)│ date_col: date_col@3 ││ │ +31)│ int_col: int_col@0 ││ │ +32)│ ││ │ +33)│ string_col: ││ │ +34)│ string_col@1 ││ │ +35)└─────────────┬─────────────┘└─────────────┬─────────────┘ +36)┌─────────────┴─────────────┐┌─────────────┴─────────────┐ +37)│ RepartitionExec ││ DataSourceExec │ +38)│ ││ -------------------- │ +39)│ ││ files: 1 │ +40)│ ││ format: parquet │ +41)└─────────────┬─────────────┘└───────────────────────────┘ +42)┌─────────────┴─────────────┐ +43)│ DataSourceExec │ +44)│ -------------------- │ +45)│ files: 1 │ +46)│ format: csv │ +47)└───────────────────────────┘ # Query with outer hash join. query TT @@ -755,19 +769,33 @@ physical_plan 20)└─────────────┬─────────────┘└─────────────┬─────────────┘ 21)┌─────────────┴─────────────┐┌─────────────┴─────────────┐ 22)│ ProjectionExec ││ RepartitionExec │ -23)└─────────────┬─────────────┘└─────────────┬─────────────┘ -24)┌─────────────┴─────────────┐┌─────────────┴─────────────┐ -25)│ RepartitionExec ││ DataSourceExec │ -26)│ ││ -------------------- │ -27)│ ││ files: 1 │ -28)│ ││ format: parquet │ -29)└─────────────┬─────────────┘└───────────────────────────┘ -30)┌─────────────┴─────────────┐ -31)│ DataSourceExec │ -32)│ -------------------- │ -33)│ files: 1 │ -34)│ format: csv │ -35)└───────────────────────────┘ +23)│ -------------------- ││ │ +24)│ CAST(table1.string_col AS ││ │ +25)│ Utf8View): ││ │ +26)│ CAST(string_col@1 AS ││ │ +27)│ Utf8View) ││ │ +28)│ ││ │ +29)│ bigint_col: ││ │ +30)│ bigint_col@2 ││ │ +31)│ ││ │ +32)│ date_col: date_col@3 ││ │ +33)│ int_col: int_col@0 ││ │ +34)│ ││ │ +35)│ string_col: ││ │ +36)│ string_col@1 ││ │ +37)└─────────────┬─────────────┘└─────────────┬─────────────┘ +38)┌─────────────┴─────────────┐┌─────────────┴─────────────┐ +39)│ RepartitionExec ││ DataSourceExec │ +40)│ ││ -------------------- │ +41)│ ││ files: 1 │ +42)│ ││ format: parquet │ +43)└─────────────┬─────────────┘└───────────────────────────┘ +44)┌─────────────┴─────────────┐ +45)│ DataSourceExec │ +46)│ -------------------- │ +47)│ files: 1 │ +48)│ format: csv │ +49)└───────────────────────────┘ # cleanup