Skip to content

Commit a4f7611

Browse files
committed
Fix test error
1 parent 57c50b8 commit a4f7611

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff 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

sql/core/src/test/scala/org/apache/spark/sql/execution/ReduceNumShufflePartitionsSuite.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff 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 {

0 commit comments

Comments
 (0)