dongjoon-hyun commented on code in PR #57087:
URL: https://github.com/apache/spark/pull/57087#discussion_r3539964770
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/adaptive/ShufflePartitionsUtil.scala:
##########
@@ -48,7 +48,27 @@ object ShufflePartitionsUtil extends Logging {
minNumPartitions: Int,
minPartitionSize: Long,
shuffleStageIds: Seq[Int] = Seq.empty): Seq[Seq[ShufflePartitionSpec]] =
{
+ coalescePartitions(
+ mapOutputStatistics,
+ inputPartitionSpecs,
+ advisoryTargetSize,
+ minNumPartitions,
+ minPartitionSize,
+ shuffleStageIds,
+ Int.MaxValue)
+ }
+
+ def coalescePartitions(
+ mapOutputStatistics: Seq[Option[MapOutputStatistics]],
+ inputPartitionSpecs: Seq[Option[Seq[ShufflePartitionSpec]]],
+ advisoryTargetSize: Long,
+ minNumPartitions: Int,
+ minPartitionSize: Long,
+ shuffleStageIds: Seq[Int],
+ maxReducerPartitionsPerTask: Int): Seq[Seq[ShufflePartitionSpec]] = {
Review Comment:
I guess we don't need to overload this because `ShufflePartitionsUtil` is
used only at `CoalesceShufflePartitions`. Can we simply adjust the existing
method?
--
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]