Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Import ordering and spacing/
  • Loading branch information
Ilya Ganelin committed Jul 31, 2015
commit d2fe6b045c4b89a555d98fc289f6a380f8bd2b88
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,10 @@ import org.apache.spark.rdd.{RDD, ShuffledRDD}
import org.apache.spark.shuffle.sort.SortShuffleManager
import org.apache.spark.sql.catalyst.InternalRow
import org.apache.spark.sql.catalyst.CatalystTypeConverters
import org.apache.spark.sql.catalyst.errors._
import org.apache.spark.sql.catalyst.expressions._
import org.apache.spark.sql.catalyst.plans.physical._
import org.apache.spark.sql.Row
import org.apache.spark.sql.types.StructType
import org.apache.spark.util.collection.ExternalSorterNoAgg
import org.apache.spark.util.collection.unsafe.sort.PrefixComparator
import org.apache.spark.util.{CompletionIterator, MutablePair}
import org.apache.spark.util.MutablePair
import org.apache.spark.{HashPartitioner, SparkEnv}

/**
Expand Down Expand Up @@ -234,7 +230,6 @@ case class Repartition(numPartitions: Int, shuffle: Boolean, child: SparkPlan)
}
}


/**
* :: DeveloperApi ::
* Returns a table with the elements from left that are not in right using
Expand Down
19 changes: 7 additions & 12 deletions sql/core/src/main/scala/org/apache/spark/sql/execution/sort.scala
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,10 @@

package org.apache.spark.sql.execution

import org.apache.spark.annotation.DeveloperApi
import org.apache.spark.rdd.RDD
import org.apache.spark.sql.catalyst.InternalRow
import org.apache.spark.sql.catalyst.errors._
import org.apache.spark.sql.catalyst.expressions._
import org.apache.spark.sql.catalyst.InternalRow
import org.apache.spark.sql.catalyst.plans.physical.{Distribution, OrderedDistribution, UnspecifiedDistribution}
import org.apache.spark.sql.types.StructType
import org.apache.spark.util.CompletionIterator
Expand All @@ -33,16 +32,14 @@ import org.apache.spark.util.collection.ExternalSorterNoAgg


/**
* :: DeveloperApi ::
* Performs a sort on-heap.
* @param global when true performs a global sort of all partitions by shuffling the data first
* if necessary.
*/
@DeveloperApi
case class Sort(
sortOrder: Seq[SortOrder],
global: Boolean,
child: SparkPlan)
sortOrder: Seq[SortOrder],
global: Boolean,
child: SparkPlan)
extends UnaryNode {
override def requiredChildDistribution: Seq[Distribution] =
if (global) OrderedDistribution(sortOrder) :: Nil else UnspecifiedDistribution :: Nil
Expand All @@ -60,16 +57,14 @@ case class Sort(
}

/**
* :: DeveloperApi ::
* 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.
*/
@DeveloperApi
case class ExternalSort(
sortOrder: Seq[SortOrder],
global: Boolean,
child: SparkPlan)
sortOrder: Seq[SortOrder],
global: Boolean,
child: SparkPlan)
extends UnaryNode {

override def requiredChildDistribution: Seq[Distribution] =
Expand Down