Skip to content

Commit

Permalink
inherit ordering in project
Browse files Browse the repository at this point in the history
  • Loading branch information
adrian-wang committed Apr 15, 2015
1 parent c8e82a3 commit b198278
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ import org.apache.spark.sql.catalyst.rules.Rule
import org.apache.spark.util.MutablePair

/**
* :: DeveloperApi ::
* Shuffle data according to a new partition rule, and sort inside each partition if necessary.
* @param newPartitioning The new partitioning way that required by parent
* @param sort Whether we will sort inside each partition
* @param child Child operator
*/
@DeveloperApi
case class Exchange(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,9 @@ case class Project(projectList: Seq[NamedExpression], child: SparkPlan) extends
/**
* outputOrdering of Project is not always same with child's outputOrdering if the certain
* key is pruned, however, if the key is pruned then we must not require child using this
* ordering from upper layer, only if the ordering would not be changed by a negative, there
* would be a way to keep the ordering.
* TODO: we may utilize this feature later to avoid some unnecessary sorting.
* ordering from upper layer, so it is fine to keep it to avoid some unnecessary sorting.
*/
override def outputOrdering: Option[Ordering[Row]] = None
override def outputOrdering: Option[Ordering[Row]] = child.outputOrdering
}

/**
Expand Down

0 comments on commit b198278

Please sign in to comment.