Skip to content

Commit abf3ef1

Browse files
committed
Fix test error
1 parent 9a6fe6c commit abf3ef1

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2701,11 +2701,13 @@ class SQLConf extends Serializable with Logging {
27012701

27022702
def cacheVectorizedReaderEnabled: Boolean = getConf(CACHE_VECTORIZED_READER_ENABLED)
27032703

2704+
def defaultNumShufflePartitions: Int = getConf(SHUFFLE_PARTITIONS)
2705+
27042706
def numShufflePartitions: Int = {
27052707
if (adaptiveExecutionEnabled && coalesceShufflePartitionsEnabled) {
2706-
getConf(COALESCE_PARTITIONS_INITIAL_PARTITION_NUM).getOrElse(getConf(SHUFFLE_PARTITIONS))
2708+
getConf(COALESCE_PARTITIONS_INITIAL_PARTITION_NUM).getOrElse(defaultNumShufflePartitions)
27072709
} else {
2708-
getConf(SHUFFLE_PARTITIONS)
2710+
defaultNumShufflePartitions
27092711
}
27102712
}
27112713

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ case class EnsureRequirements(conf: SQLConf) extends Rule[SparkPlan] {
8989
// expected number of shuffle partitions. However, if it's smaller than
9090
// `conf.numShufflePartitions`, we pick `conf.numShufflePartitions` as the
9191
// expected number of shuffle partitions.
92-
math.max(nonShuffleChildrenNumPartitions.max, conf.numShufflePartitions)
92+
math.max(nonShuffleChildrenNumPartitions.max, conf.defaultNumShufflePartitions)
9393
} else {
9494
childrenNumPartitions.max
9595
}

0 commit comments

Comments
 (0)