alamb commented on code in PR #10448:
URL: https://github.com/apache/datafusion/pull/10448#discussion_r1598451810
##########
datafusion/expr/src/logical_plan/plan.rs:
##########
@@ -369,8 +369,18 @@ impl LogicalPlan {
// The join keys in using-join must be columns.
let columns =
on.iter().try_fold(HashSet::new(), |mut accumu, (l, r)| {
- accumu.insert(l.try_into_col()?);
- accumu.insert(r.try_into_col()?);
+ let Some(l) = l.try_as_col().cloned() else {
+ return internal_err!(
Review Comment:
I think making the error here (rather than in `try_into_col`) results in a
more specific error message that will be easier to debug if we ever hit it
--
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]