Github user MasterDDT commented on the issue:
https://github.com/apache/spark/pull/17400
Here is a sort example:
```
scala> val df1 = Seq((1, 2), (3, 4)).toDF("a", "b").sort("a")
df1: org.apache.spark.sql.Dataset[org.apache.spark.sql.Row] = [a: int, b:
int]
scala> val df2 = df1.selectExpr("a as newA", "b")
df2: org.apache.spark.sql.DataFrame = [newA: int, b: int]
scala> println(df1.join(df2, df1("a") ===
df2("newA")).queryExecution.executedPlan)
*SortMergeJoin [args=[a#37119], [newA#37125],
Inner][outPart=PartitioningCollection(8, hashpartitioning(a#37119,
8)%NONNULL,hashpartitioning(newA#37125, 8)%NONNULL)][outOrder=List(a#37119
ASC%NONNULL)][output=List(a#37119:int%NONNULL, b#37120:int%NONNULL,
newA#37125:int%NONNULL, b#37136:int%NONNULL)]
:- *Sort [args=[a#37119 ASC], false, 0][outPart=HashPartitioning(8,
a#37119:int%NONNULL)][outOrder=List(a#37119
ASC%NONNULL)][output=List(a#37119:int%NONNULL, b#37120:int%NONNULL)]
: +- Exchange [args=hashpartitioning(a#37119,
8)%NONNULL][outPart=HashPartitioning(8,
a#37119:int%NONNULL)][outOrder=List()][output=List(a#37119:int%NONNULL,
b#37120:int%NONNULL)]
: +- *Sort [args=[a#37119 ASC], true, 0][outPart=RangePartitioning(8,
a#37119 ASC%NONNULL)][outOrder=ArrayBuffer(a#37119
ASC%NONNULL)][output=List(a#37119:int%NONNULL, b#37120:int%NONNULL)]
: +- Exchange [args=rangepartitioning(a#37119 ASC,
8)%NONNULL][outPart=RangePartitioning(8, a#37119
ASC%NONNULL)][outOrder=List()][output=List(a#37119:int%NONNULL,
b#37120:int%NONNULL)]
: +- LocalTableScan [args=[a#37119,
b#37120]][outPart=UnknownPartitioning(0)][outOrder=List()][output=List(a#37119:int%NONNULL,
b#37120:int%NONNULL)]
+- *Sort [args=[newA#37125 ASC], false, 0][outPart=HashPartitioning(8,
newA#37125:int%NONNULL)][outOrder=List(newA#37125
ASC%NONNULL)][output=ArrayBuffer(newA#37125:int%NONNULL, b#37136:int%NONNULL)]
+- Exchange [args=hashpartitioning(newA#37125,
8)%NONNULL][outPart=HashPartitioning(8,
newA#37125:int%NONNULL)][outOrder=List()][output=ArrayBuffer(newA#37125:int%NONNULL,
b#37136:int%NONNULL)]
+- *Project [args=[a#37135 AS newA#37125,
b#37136]][outPart=RangePartitioning(8, a#37135
ASC%NONNULL)][outOrder=ArrayBuffer(a#37135
ASC%NONNULL)][output=ArrayBuffer(newA#37125:int%NONNULL, b#37136:int%NONNULL)]
+- *Sort [args=[a#37135 ASC], true,
0][outPart=RangePartitioning(8, a#37135
ASC%NONNULL)][outOrder=ArrayBuffer(a#37135
ASC%NONNULL)][output=List(a#37135:int%NONNULL, b#37136:int%NONNULL)]
+- Exchange [args=rangepartitioning(a#37135 ASC,
8)%NONNULL][outPart=RangePartitioning(8, a#37135
ASC%NONNULL)][outOrder=List()][output=List(a#37135:int%NONNULL,
b#37136:int%NONNULL)]
+- LocalTableScan [args=[a#37135,
b#37136]][outPart=UnknownPartitioning(0)][outOrder=List()][output=List(a#37135:int%NONNULL,
b#37136: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]