mustafasrepo commented on code in PR #8991:
URL: https://github.com/apache/arrow-datafusion/pull/8991#discussion_r1469162445
##########
datafusion/physical-plan/src/joins/utils.rs:
##########
@@ -405,12 +406,47 @@ pub fn check_join_is_valid(left: &Schema, right: &Schema,
on: JoinOnRef) -> Resu
fn check_join_set_is_valid(
left: &HashSet<Column>,
right: &HashSet<Column>,
- on: &[(Column, Column)],
+ on: &[(PhysicalExprRef, PhysicalExprRef)],
) -> Result<()> {
- let on_left = &on.iter().map(|on| on.0.clone()).collect::<HashSet<_>>();
+ let on_left = &on
+ .iter()
+ .flat_map(|on| {
+ let left = on.0.clone();
+
+ let mut columns = vec![];
+ left.apply(&mut |expr| {
+ Ok({
+ if let Some(column) =
expr.as_any().downcast_ref::<Column>() {
+ columns.push(column.clone());
+ }
+ VisitRecursion::Continue
+ })
+ })
+ .unwrap();
Review Comment:
For this section, I think you can use `collect_columns` util.
--
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]