Github user gatorsmile commented on the pull request: https://github.com/apache/spark/pull/9548#issuecomment-155183305 I can't fix the problem without a major code change. The current design of dataFrame has a fundamental problem. When using column references, we might hit various strange issues if the dataFrame has the columns with the same name and expression id. Note that this might occur even if we do not have self joins. For example, in the following code, ```scala val df1 = Seq((1, 3), (2, 1)).toDF("keyCol1", "keyCol2") val df2 = Seq((1, 4, 0), (2, 1, 0)).toDF("keyCol1", "keyCol3", "keyColToDrop") val df3 = df1.join(df2, df1("keyCol1") === df2("keyCol1")) val col = df3("keyColToDrop") val df = df2.drop(col) df.printSchema() ``` Above, we can use a column reference of df3 to drop the column in df2. That does not make sense, right? In each column reference, we have to know the original data source. @marmbrus @rxin @liancheng Should I propose a solution to fix this problem? Does the new Dataset APIs resolve this issue?
--- 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