Skip to content

Commit 38c78cc

Browse files
revert the SortPartition in SparkStrategies
1 parent 7e9dd15 commit 38c78cc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

sql/core/src/main/scala/org/apache/spark/sql/execution/SparkStrategies.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,10 @@ private[sql] abstract class SparkStrategies extends QueryPlanner[SparkPlan] {
257257
execution.Distinct(partial = false,
258258
execution.Distinct(partial = true, planLater(child))) :: Nil
259259

260+
case logical.SortPartitions(sortExprs, child) =>
261+
// This sort only sorts tuples within a partition. Its requiredDistribution will be
262+
// an UnspecifiedDistribution.
263+
execution.Sort(sortExprs, global = false, planLater(child)) :: Nil
260264
case logical.Sort(sortExprs, global, child) if sqlContext.externalSortEnabled =>
261265
execution.ExternalSort(sortExprs, global, planLater(child)):: Nil
262266
case logical.Sort(sortExprs, global, child) =>

0 commit comments

Comments
 (0)