jfahne commented on issue #16120:
URL: https://github.com/apache/datafusion/issues/16120#issuecomment-2906960544

   Okay so I dug through it and found the error is coming from the following 
call chain:
   
   - The `LogicalPlanBuilder` returned by the `parse_join` calls `join_using` 
on the builder 
([link](https://github.com/apache/datafusion/blob/main/datafusion/sql/src/relation/join.rs#L151))
   - The `left_keys` calculation from `join_using` calls the 
`LogicalPlanBuilder` method, `normalize` 
([link](https://github.com/apache/datafusion/blob/main/datafusion/expr/src/logical_plan/builder.rs#L1127))
   - The `normalize` method calls the `Column` struct method, 
`normalize_with_schemas_and_ambiguity_check` 
([link](https://github.com/apache/datafusion/blob/main/datafusion/expr/src/logical_plan/builder.rs#L976))
   - The `normalize_with_schemas_and_ambiguity_check` build a schema error for 
`FieldNotFound` because the passed `using_columns` argument is empty 
([link](https://github.com/apache/datafusion/blob/main/datafusion/common/src/column.rs#L219))
   
   This appears to be due to something happening here in the sql unparser 
([link](https://github.com/apache/datafusion/blob/main/datafusion/sql/src/unparser/plan.rs#L1276)).
 I am still working out exactly what is going wrong but wanted to give an 
update.


-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to