Github user JoshRosen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/8831#discussion_r39907246
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/sort.scala 
---
    @@ -31,38 +31,12 @@ import org.apache.spark.{SparkEnv, InternalAccumulator, 
TaskContext}
     // This file defines various sort operators.
     
////////////////////////////////////////////////////////////////////////////////////////////////////
     
    -
    -/**
    - * Performs a sort on-heap.
    - * @param global when true performs a global sort of all partitions by 
shuffling the data first
    - *               if necessary.
    - */
    -case class Sort(
    -    sortOrder: Seq[SortOrder],
    -    global: Boolean,
    -    child: SparkPlan)
    -  extends UnaryNode {
    -  override def requiredChildDistribution: Seq[Distribution] =
    -    if (global) OrderedDistribution(sortOrder) :: Nil else 
UnspecifiedDistribution :: Nil
    -
    -  protected override def doExecute(): RDD[InternalRow] = attachTree(this, 
"sort") {
    -    child.execute().mapPartitions( { iterator =>
    -      val ordering = newOrdering(sortOrder, child.output)
    -      iterator.map(_.copy()).toArray.sorted(ordering).iterator
    -    }, preservesPartitioning = true)
    -  }
    -
    -  override def output: Seq[Attribute] = child.output
    -
    -  override def outputOrdering: Seq[SortOrder] = sortOrder
    -}
    -
     /**
      * Performs a sort, spilling to disk as needed.
      * @param global when true performs a global sort of all partitions by 
shuffling the data first
      *               if necessary.
      */
    -case class ExternalSort(
    +case class Sort(
    --- End diff --
    
    Here, I just renamed `ExternalSort` to `Sort` and deleted the old in-memory 
`Sort`.


---
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

Reply via email to