Skip to content

Commit 782827a

Browse files
committed
add the comments
1 parent e13f637 commit 782827a

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/adaptive/OptimizeLocalShuffleReader.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ case class OptimizeLocalShuffleReader(conf: SQLConf) extends Rule[SparkPlan] {
4343

4444
val optimizedPlan = if (shuffleStages.isEmpty ||
4545
!shuffleStages.forall(_.plan.canChangeNumPartitions)) {
46+
// For the Exchange introduced by repartition,
47+
// don't apply this rule to avoid additional shuffle introduced for the parent stage.
4648
plan
4749
} else {
4850
plan.transformUp {

0 commit comments

Comments
 (0)