onursatici opened a new pull request, #13182: URL: https://github.com/apache/datafusion/pull/13182
## Which issue does this PR close? `LogicalPlanBuilder::join_with_expr_keys` rejects join conditions when the join expression has one unqualified and one qualified column with the same name. This is not consistent with `LogicalPlanBuilder::join` where such cases are handled well. ## Rationale for this change This becomes a problem in `datafusion::proto` where joins are deserialised with using `join_with_expr_keys`. Specifically, a join condition like `... from t1 join t2 where id = t2.id` where `t1.id` is written unqualified is successfully parsed and the logical plan is created. However, when it comes to deserialising such plan from proto, we hit get ambiguous reference error, and fail to deserialise. <!-- Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed. Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes. --> ## What changes are included in this PR? if all expressions in `join_with_expr_keys` are `Column`, use the same code path as a regular join. <!-- There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR. --> ## Are these changes tested? A new unit test is added <!-- We typically require tests for all PRs in order to: 1. Prevent the code from being accidentally broken by subsequent changes 2. Serve as another way to document the expected behavior of the code If tests are not included in your PR, please explain why (for example, are they covered by existing tests)? --> ## Are there any user-facing changes? There should be none <!-- If there are user-facing changes then we may require documentation to be updated before approving the PR. --> <!-- If there are any breaking changes to public APIs, please add the `api change` label. --> -- 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