carsonwang commented on a change in pull request #24978: [SPARK-28177][SQL]
Adjust post shuffle partition number in adaptive execution
URL: https://github.com/apache/spark/pull/24978#discussion_r299678167
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala
##########
@@ -1911,14 +1911,14 @@ class SQLConf extends Serializable with Logging {
def targetPostShuffleInputSize: Long =
getConf(SHUFFLE_TARGET_POSTSHUFFLE_INPUT_SIZE)
- def runtimeReoptimizationEnabled: Boolean =
getConf(RUNTIME_REOPTIMIZATION_ENABLED)
-
- def adaptiveExecutionEnabled: Boolean =
- getConf(ADAPTIVE_EXECUTION_ENABLED) &&
!getConf(RUNTIME_REOPTIMIZATION_ENABLED)
+ def adaptiveExecutionEnabled: Boolean = getConf(ADAPTIVE_EXECUTION_ENABLED)
def minNumPostShufflePartitions: Int =
getConf(SHUFFLE_MIN_NUM_POSTSHUFFLE_PARTITIONS)
+ def maxNumPostShufflePartitions: Int =
+
getConf(SHUFFLE_MAX_NUM_POSTSHUFFLE_PARTITIONS).getOrElse(numShufflePartitions)
Review comment:
People usually already have tuned `spark.sql.shuffle.partitions` for each
workload they run periodically. The initial shuffle partition number for
adaptive execution allows user to set a global value (relative large) that can
work for all queries. If user doesn't set it, it will default to
`spark.sql.shuffle.partitions`.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]