File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
main/scala/org/apache/spark/sql/execution/exchange
test/scala/org/apache/spark/sql/execution Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -89,8 +89,7 @@ case class EnsureRequirements(conf: SQLConf) extends Rule[SparkPlan] {
8989 val nonShuffleChildrenNumPartitions =
9090 childrenIndexes.map(children).filterNot(_.isInstanceOf [ShuffleExchangeExec ])
9191 .map(_.outputPartitioning.numPartitions)
92- val expectedChildrenNumPartitions = if (nonShuffleChildrenNumPartitions.nonEmpty &&
93- conf.maxNumPostShufflePartitions > conf.numShufflePartitions) {
92+ val expectedChildrenNumPartitions = if (nonShuffleChildrenNumPartitions.nonEmpty) {
9493 math.max(nonShuffleChildrenNumPartitions.max, conf.numShufflePartitions)
9594 } else {
9695 childrenNumPartitions.max
Original file line number Diff line number Diff line change @@ -274,6 +274,7 @@ class ReduceNumShufflePartitionsSuite extends SparkFunSuite with BeforeAndAfterA
274274 .setMaster(" local[*]" )
275275 .setAppName(" test" )
276276 .set(UI_ENABLED , false )
277+ .set(SQLConf .SHUFFLE_PARTITIONS .key, " 5" )
277278 .set(SQLConf .SHUFFLE_MAX_NUM_POSTSHUFFLE_PARTITIONS .key, " 5" )
278279 .set(SQLConf .ADAPTIVE_EXECUTION_ENABLED .key, " true" )
279280 .set(SQLConf .AUTO_BROADCASTJOIN_THRESHOLD .key, " -1" )
@@ -507,7 +508,7 @@ class ReduceNumShufflePartitionsSuite extends SparkFunSuite with BeforeAndAfterA
507508 join,
508509 expectedAnswer.collect())
509510
510- // Then, let's make sure we do not reduce number of ppst shuffle partitions.
511+ // Then, let's make sure we do not reduce number of post shuffle partitions.
511512 val finalPlan = join.queryExecution.executedPlan
512513 .asInstanceOf [AdaptiveSparkPlanExec ].executedPlan
513514 val shuffleReaders = finalPlan.collect {
You can’t perform that action at this time.
0 commit comments