ygf11 opened a new pull request, #4258:
URL: https://github.com/apache/arrow-datafusion/pull/4258
# Which issue does this PR close?
Closes #4197.
# Rationale for this change
When join condition is ambiguous, the `sql` will work.
It should throw an error, like PostgreSQL or Spark do.
For example, test0 and test1 both has c0 column:
```sql
❯ explain select t0.c0, t1.c0 from test0 as t0 inner join test0 as t1 on c0
= 1;
+---------------+-------------------------------------------------------------------------------------------------------------+
| plan_type | plan
|
+---------------+-------------------------------------------------------------------------------------------------------------+
| logical_plan | Projection: t0.c0, t1.c0
|
| | CrossJoin:
|
| | Filter: t0.c0 = Int16(1)
|
| | SubqueryAlias: t0
|
| | TableScan: test0 projection=[c0]
|
| | SubqueryAlias: t1
|
| | TableScan: test0 projection=[c0]
|
```
# What changes are included in this PR?
Add ambiguous check for join condition.
# Are these changes tested?
Yes, test case is added.
# Are there any user-facing changes?
No
--
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]