cloud-fan commented on a change in pull request #32781:
URL: https://github.com/apache/spark/pull/32781#discussion_r647276457
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/adaptive/OptimizeLocalShuffleReader.scala
##########
@@ -139,6 +139,11 @@ object OptimizeLocalShuffleReader extends
CustomShuffleReaderRule {
def canUseLocalShuffleReader(plan: SparkPlan): Boolean = plan match {
case s: ShuffleQueryStageExec =>
s.mapStats.isDefined && supportLocalReader(s.shuffle)
+ case CustomShuffleReaderExec(s: ShuffleQueryStageExec, partitionSpecs)
+ if isUsedToCoalescePartitions(s.shuffle) =>
+ // Use LocalShuffleReader only when we can't CoalesceShufflePartitions
Review comment:
Why? The general rule is to always use the local reader if possible. If
coalesce happens first, local reader will respect the parallelism.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]