alamb commented on code in PR #15079:
URL: https://github.com/apache/datafusion/pull/15079#discussion_r1986065410
##########
datafusion/sqllogictest/test_files/explain_tree.slt:
##########
@@ -519,6 +534,51 @@ physical_plan
17)│ format: arrow │
18)└───────────────────────────┘
+# 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;
Review Comment:
Recommend testing outer join here:
```suggestion
explain select * from table1 outer inner join table2 on table1.int_col =
table2.int_col and table1.string_col = table2.string_col;
```
##########
datafusion/physical-plan/src/joins/hash_join.rs:
##########
@@ -669,8 +669,15 @@ impl DisplayAs for HashJoinExec {
)
}
DisplayFormatType::TreeRender => {
- // TODO: collect info
- write!(f, "")
+ let on = self
+ .on
+ .iter()
+ .map(|(c1, c2)| format!("({} = {})", c1, c2))
+ .collect::<Vec<String>>()
+ .join(", ");
+
+ writeln!(f, "join_type={:?}", self.join_type)?;
+ writeln!(f, "on=[{}]", on)
Review Comment:
I recommend
1. we remove `[` and `]`
2. don't print `join_type` if the type is `Inner`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]