LiaCastaneda commented on code in PR #16454: URL: https://github.com/apache/datafusion/pull/16454#discussion_r2158698230
########## datafusion/expr/src/logical_plan/builder.rs: ########## @@ -1667,6 +1667,34 @@ pub fn build_join_schema( dfschema.with_functional_dependencies(func_dependencies) } +/// (Re)qualify the sides of a join if needed, i.e. if the columns from one side would otherwise +/// conflict with the columns from the other. +/// This is especially useful for queries that come as Substrait, since Substrait doesn't currently allow specifying +/// aliases, neither for columns nor for tables. DataFusion requires columns to be uniquely identifiable, in some +/// places (see e.g. DFSchema::check_names). +pub fn requalify_sides_if_needed( Review Comment: I moved this helper function to the logical plan `builder` module since now its not used only by the substrait consumer but also by plan.rs. -- 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