cloud-fan commented on a change in pull request #35574:
URL: https://github.com/apache/spark/pull/35574#discussion_r813488144
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/physical/partitioning.scala
##########
@@ -322,8 +346,15 @@ case class RangePartitioning(ordering: Seq[SortOrder],
numPartitions: Int)
// `RangePartitioning(a, b, c)` satisfies `OrderedDistribution(a,
b)`.
val minSize = Seq(requiredOrdering.size, ordering.size).min
requiredOrdering.take(minSize) == ordering.take(minSize)
- case ClusteredDistribution(requiredClustering, _) =>
- ordering.map(_.child).forall(x =>
requiredClustering.exists(_.semanticEquals(x)))
+ case c @ ClusteredDistribution(requiredClustering, _,
requiredAllClusterKeys) =>
+ val expressions = ordering.map(_.child)
+ if (requiredAllClusterKeys) {
+ // Checks `RangePartitioning` is partitioned on exactly same
clustering keys of
+ // `ClusteredDistribution`.
Review comment:
This is less strict than the previous `HashClusteredDistribution`, but
looks fine.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]