Skip to content

Commit 57c50b8

Browse files
committed
Fix test error: org.apache.spark.sql.execution.ReduceNumShufflePartitionsSuite
1 parent a50122b commit 57c50b8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@ 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) {
92+
val expectedChildrenNumPartitions = if (nonShuffleChildrenNumPartitions.nonEmpty &&
93+
conf.maxNumPostShufflePartitions > conf.numShufflePartitions) {
9394
math.max(nonShuffleChildrenNumPartitions.max, conf.numShufflePartitions)
9495
} else {
9596
childrenNumPartitions.max

0 commit comments

Comments
 (0)