Skip to content

Commit 0da9e82

Browse files
committed
Added comments.
1 parent 1effe75 commit 0da9e82

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sql/core/src/main/scala/org/apache/spark/sql/execution/exchange/EnsureRequirements.scala

+2
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ case class EnsureRequirements(conf: SQLConf) extends Rule[SparkPlan] {
5252
case (child, distribution) =>
5353
val numPartitions = distribution.requiredNumPartitions
5454
.getOrElse(conf.numShufflePartitions)
55+
// Like optimizer.CollapseRepartition removes adjacent repartition operations,
56+
// adjacent repartitions performed by shuffle can be also removed.
5557
val newChild = if (child.isInstanceOf[ShuffleExchangeExec]) child.children.head else child
5658
ShuffleExchangeExec(distribution.createPartitioning(numPartitions), newChild)
5759
}

0 commit comments

Comments
 (0)