Github user MasterDDT commented on the issue:
https://github.com/apache/spark/pull/17400
For example here is a similar bug for sorting:
>scala> Seq((1, 2), (3, 4)).toDF("a", "b").sort("a").selectExpr("a as
newA", "b").sort("newA")
res3: org.apache.spark.sql.Dataset[org.apache.spark.sql.Row] = [newA: int,
b: int]
>scala> println(res3.queryExecution.executedPlan)
*Sort [args=[newA#36673 ASC], true, 0][outPart=RangePartitioning(8,
newA#36673 ASC%NONNULL)][outOrder=ArrayBuffer(newA#36673
ASC%NONNULL)][output=ArrayBuffer(newA#36673:int%NONNULL, b#36668:int%NONNULL)]
+- Exchange [args=rangepartitioning(newA#36673 ASC,
8)%NONNULL][outPart=RangePartitioning(8, newA#36673
ASC%NONNULL)][outOrder=List()][output=ArrayBuffer(newA#36673:int%NONNULL,
b#36668:int%NONNULL)]
+- *Project [args=[a#36667 AS newA#36673,
b#36668]][outPart=RangePartitioning(8, a#36667
ASC%NONNULL)][outOrder=ArrayBuffer(a#36667
ASC%NONNULL)][output=ArrayBuffer(newA#36673:int%NONNULL, b#36668:int%NONNULL)]
+- *Sort [args=[a#36667 ASC], true, 0][outPart=RangePartitioning(8,
a#36667 ASC%NONNULL)][outOrder=ArrayBuffer(a#36667
ASC%NONNULL)][output=List(a#36667:int%NONNULL, b#36668:int%NONNULL)]
+- Exchange [args=rangepartitioning(a#36667 ASC,
8)%NONNULL][outPart=RangePartitioning(8, a#36667
ASC%NONNULL)][outOrder=List()][output=List(a#36667:int%NONNULL,
b#36668:int%NONNULL)]
+- LocalTableScan [args=[a#36667,
b#36668]][outPart=UnknownPartitioning(0)][outOrder=List()][output=List(a#36667:int%NONNULL,
b#36668:int%NONNULL)]
---
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]