cloud-fan commented on a change in pull request #33655:
URL: https://github.com/apache/spark/pull/33655#discussion_r683585714
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/adaptive/ShufflePartitionsUtil.scala
##########
@@ -56,13 +56,9 @@ object ShufflePartitionsUtil extends Logging {
// If `minNumPartitions` is very large, it is possible that we need to use
a value less than
// `advisoryTargetSize` as the target size of a coalesced task.
val totalPostShuffleInputSize =
mapOutputStatistics.flatMap(_.map(_.bytesByPartitionId.sum)).sum
- // The max at here is to make sure that when we have an empty table, we
only have a single
- // coalesced partition.
- // There is no particular reason that we pick 16. We just need a number to
prevent
- // `maxTargetSize` from being set to 0.
- val maxTargetSize = math.max(
- math.ceil(totalPostShuffleInputSize / minNumPartitions.toDouble).toLong,
16)
- val targetSize = math.min(maxTargetSize, advisoryTargetSize)
+ val maxTargetSize = math.ceil(totalPostShuffleInputSize /
minNumPartitions.toDouble).toLong
+ // It's meaningless to make target size smaller than minPartitionSize.
Review comment:
a small cleanup
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]