-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Implement tree
explain for HashJoinExec
#15079
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
let on = self | ||
.on | ||
.iter() | ||
.map(|(c1, c2)| format!("({}, {})", c1, c2)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think formatting this join condition as 'c1 = c1' is easier to understand.
Maybe also concat multiple join condition with '\n' instead of ',' ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the render tree, each line is parsed to extract key and value. If we add '\n' in the value, it will be treated as a new line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
c1 = c1 is clearer than before! 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @irenjj adn @2010YOUY01
I have some small suggestions but I don't think they are necessary
.join(", "); | ||
|
||
writeln!(f, "join_type={:?}", self.join_type)?; | ||
writeln!(f, "on=[{}]", on) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I recommend
- we remove
[
and]
- don't print
join_type
if the type isInner
@@ -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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Recommend testing outer join here:
explain select * from table1 inner join table2 on table1.int_col = table2.int_col and table1.string_col = table2.string_col; | |
explain select * from table1 outer inner join table2 on table1.int_col = table2.int_col and table1.string_col = table2.string_col; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
Thanks again @irenjj |
Which issue does this PR close?
tree
explain forHashJoinExec
#15078Rationale for this change
What changes are included in this PR?
Are these changes tested?
Are there any user-facing changes?