Github user mgaido91 commented on a diff in the pull request:
https://github.com/apache/spark/pull/21184#discussion_r201957701
--- Diff: sql/core/src/test/scala/org/apache/spark/sql/DataFrameSuite.scala
---
@@ -2265,4 +2266,15 @@ class DataFrameSuite extends QueryTest with
SharedSQLContext {
val df = spark.range(1).select($"id", new Column(Uuid()))
checkAnswer(df, df.collect())
}
+
+ test("SPARK-24051: using the same alias can produce incorrect result") {
--- End diff --
yes, without the change the result is:
```
+---+---+---+
| a| b| n|
+---+---+---+
| 1| 0| 2|
| 2| 0| 2|
| 3| 0| 1|
+---+---+---+
```
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]