ulysses-you commented on a change in pull request #33310:
URL: https://github.com/apache/spark/pull/33310#discussion_r673784952



##########
File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/adaptive/OptimizeLocalShuffleReader.scala
##########
@@ -72,10 +72,24 @@ object OptimizeLocalShuffleReader extends 
CustomShuffleReaderRule {
     assert(numMappers > 0)
     val numReducers = shuffleStage.shuffle.numPartitions
     val expectedParallelism = advisoryParallelism.getOrElse(numReducers)
-    val splitPoints = equallyDivide(numReducers, math.max(1, 
expectedParallelism / numMappers))
-    (0 until numMappers).flatMap { mapIndex =>
-      (splitPoints :+ numReducers).sliding(2).map {
-        case Seq(start, end) => PartialMapperPartitionSpec(mapIndex, start, 
end)
+    val splitPoints = if (numMappers == 0) {

Review comment:
       we don't need this check anymore, see line 72.




-- 
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]

Reply via email to