yyy1000 commented on code in PR #8780:
URL: https://github.com/apache/arrow-datafusion/pull/8780#discussion_r1463380187
##########
datafusion/physical-plan/src/joins/utils.rs:
##########
@@ -293,9 +293,17 @@ fn check_join_set_is_valid(
let right_missing = on_right.difference(right).collect::<HashSet<_>>();
if !left_missing.is_empty() | !right_missing.is_empty() {
- return plan_err!(
- "The left or right side of the join does not have all columns on
\"on\": \nMissing on the left: {left_missing:?}\nMissing on the right:
{right_missing:?}"
- );
+ let on_left_reverse = &on.iter().map(|on|
on.1.clone()).collect::<HashSet<_>>();
+ let left_missing_reverse =
+ on_left_reverse.difference(left).collect::<HashSet<_>>();
+ let on_right_reverse = &on.iter().map(|on|
on.0.clone()).collect::<HashSet<_>>();
+ let right_missing_reverse =
+ on_right_reverse.difference(right).collect::<HashSet<_>>();
+ if !left_missing_reverse.is_empty() |
!right_missing_reverse.is_empty() {
+ return plan_err!(
+ "The left or right side of the join does not have all columns
on \"on\": \nMissing on the left: {left_missing:?}\nMissing on the right:
{right_missing:?}"
+ );
+ }
Review Comment:
Ah, got it. I should remove this.
--
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]