Github user HyukjinKwon commented on a diff in the pull request: https://github.com/apache/spark/pull/23249#discussion_r240123260 --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/physical/partitioning.scala --- @@ -262,6 +261,15 @@ case class RangePartitioning(ordering: Seq[SortOrder], numPartitions: Int) super.satisfies0(required) || { required match { case OrderedDistribution(requiredOrdering) => + // If `ordering` is a prefix of `requiredOrdering`: + // - Let's say `ordering` is [a, b] and `requiredOrdering` is [a, b, c]. If a row is + // larger than another row w.r.t. [a, b], it's also larger w.r.t. [a, b, c]. So + // `RangePartitioning(a, b)` satisfy `OrderedDistribution(a, b, c)`. --- End diff -- nit `satisfy` -> `satisfies`
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org