Phoenix500526 commented on PR #22998: URL: https://github.com/apache/datafusion/pull/22998#issuecomment-6355557802
> Thank you for working on this issue @Phoenix500526 and @nathanb9 > > This PR seems like it treats the symptom rather than the root cause -- basically the PR seems to try and resolve _any_ unreferenced column based on outer join keys, which isn't right. It should only update the output mapping of the join which produces the output > > I think we could make this a lot simpler by making the right plan in the first place > > Specifically, updating `LogicalPlanBuilder::join_using` which would cover both SQL and DataFrame APIs. > > After building the Join, it would wrao it in a `Projection` that emits the merged key once as an unqualified k, followed by the rest of the join output. > > For exmple for a `FULL` join it would use `CASE WHEN l.k IS NOT NULL THEN l.k ELSE r.k END AS k`. Thanks for the review, I'll handle 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]
