File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
sql/core/src/main/scala/org/apache/spark/sql/execution Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -257,10 +257,13 @@ private[sql] case class EnsureRequirements(sqlContext: SQLContext) extends Rule[
257257 // A pre-condition of ensureDistributionAndOrdering is that joins' children have compatible
258258 // partitionings. Thus, we only need to check whether the output partitionings satisfy
259259 // the required distribution. In the case where the children are all compatible, then they
260- // will either all satisfy the required distribution or will all fail to satisfy it: , since
261- // ( A.guarantees(B) && B.satisfies(C)) => A.satisfies(C) .
260+ // will either all satisfy the required distribution or will all fail to satisfy it, since
261+ // A.guarantees(B) implies that A and B satisfy the same set of distributions .
262262 // Therefore, if all children are compatible then either all or none of them will shuffled to
263263 // ensure that the distribution requirements are met.
264+ //
265+ // Note that this reasoning implicitly assumes that operators which require compatible
266+ // child partitionings have equivalent required distributions for those children.
264267 if (child.outputPartitioning.satisfies(requiredDistribution)) {
265268 child
266269 } else {
You can’t perform that action at this time.
0 commit comments