We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a50122b commit 57c50b8Copy full SHA for 57c50b8
sql/core/src/main/scala/org/apache/spark/sql/execution/exchange/EnsureRequirements.scala
@@ -89,7 +89,8 @@ case class EnsureRequirements(conf: SQLConf) extends Rule[SparkPlan] {
89
val nonShuffleChildrenNumPartitions =
90
childrenIndexes.map(children).filterNot(_.isInstanceOf[ShuffleExchangeExec])
91
.map(_.outputPartitioning.numPartitions)
92
- val expectedChildrenNumPartitions = if (nonShuffleChildrenNumPartitions.nonEmpty) {
+ val expectedChildrenNumPartitions = if (nonShuffleChildrenNumPartitions.nonEmpty &&
93
+ conf.maxNumPostShufflePartitions > conf.numShufflePartitions) {
94
math.max(nonShuffleChildrenNumPartitions.max, conf.numShufflePartitions)
95
} else {
96
childrenNumPartitions.max
0 commit comments