Github user sarutak commented on a diff in the pull request: https://github.com/apache/spark/pull/14719#discussion_r78190424 --- Diff: sql/core/src/test/scala/org/apache/spark/sql/DataFrameSuite.scala --- @@ -1580,6 +1583,28 @@ class DataFrameSuite extends QueryTest with SharedSQLContext { assert(df.persist.take(1).apply(0).toSeq(100).asInstanceOf[Long] == 100) } + test("""SPARK-17154: df("column_name") should return correct result when we do self-join""") { --- End diff -- Yeah, direct-self-join (means both child Datasets are same) is still ambiguous. In this case, `df("colmn-name")` will refers to a Dataset of the right side in the proposed implementation. I'm wondering a direct-self-join like df.join(df, <condition-exprs>, <join-type>) is similar to a query like as follows. SELECT ... FROM my_table df join my_table df on <condition>; Those queries should not be valid so I also think we shouldn't allow users to join two same Datasets and warn to duplicate the Dataset if they intend to do direct-self-join.
--- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org