xanderbailey commented on code in PR #17299: URL: https://github.com/apache/datafusion/pull/17299#discussion_r2323653717
########## datafusion/substrait/src/logical_plan/consumer/rel/project_rel.rs: ########## @@ -62,7 +62,17 @@ pub async fn from_project_rel( // to transform it into a column reference window_exprs.insert(e.clone()); } - explicit_exprs.push(name_tracker.get_uniquely_named_expr(e)?); + // Since substrait removes aliases, we need to assign literals with a UUID alias to avoid + // ambiguous names when the same literal is used before and after a join. Review Comment: Yeah maybe my phrasing isn't best here but whatever method you use to construct the substrait, it removes column names and aliases from within the plan which means literals columns are just assigned their default names (which I think come from arrow? I didn't get as far as finding where the UTF8(NULL) name comes from) -- 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