Github user gatorsmile commented on the pull request:
https://github.com/apache/spark/pull/11632#issuecomment-194931904
I like the idea. If we do not change the current behavior, name ambiguity
is just confusing. Maybe we can accept it. However, more importantly, it could
generate a wrong result. See the example
```scala
val df1 = Seq((1, 3), (2, 1)).toDF("keyCol1", "keyCol2")
val df2 = Seq((1, 4), (2, 1)).toDF("keyCol1", "keyCol3")
val df3 = df1.join(df2, df1("keyCol1") ===
df2("keyCol1")).select(df1("keyCol1"), $"keyCol3")
df3.join(df1, df3("keyCol3") === df1("keyCol1")).show()
```
The above query returns an empty result set.
However, the correct result should be (2,1,1,3).
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]