houqp commented on a change in pull request #778:
URL: https://github.com/apache/arrow-datafusion/pull/778#discussion_r677152935
##########
File path: datafusion/src/logical_plan/builder.rs
##########
@@ -282,14 +282,28 @@ impl LogicalPlanBuilder {
));
}
- let left_keys: Vec<Column> = left_keys
- .into_iter()
- .map(|c| c.into().normalize(&self.plan))
- .collect::<Result<_>>()?;
- let right_keys: Vec<Column> = right_keys
- .into_iter()
- .map(|c| c.into().normalize(right))
- .collect::<Result<_>>()?;
+ let (left_keys, right_keys): (Vec<Result<Column>>,
Vec<Result<Column>>) =
Review comment:
Yeah, I think the argument name makes sense with the old assumption that
left_keys should only refer to columns from the left plan. With this fix, it
can become confusing.
Perhaps a better signature for this function would be something along the
lines of: `join_keys: Vec<(impl Into<Column>, impl Into<Column>)>`.
If we want the dataframe API to also support order independent JOIN
conditions, then it is indeed better to address the fix within this builder
method. Otherwise I agree it would be better to fix it in the SQL planner
instead. I am leaning towards supporting this in dataframe API as well.
--
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]