maryannxue commented on a change in pull request #26400: [SPARK-29759][SQL]
local/coalesced shuffle reader shouldn't strip itself when canonicalization
URL: https://github.com/apache/spark/pull/26400#discussion_r342634323
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/adaptive/OptimizeLocalShuffleReader.scala
##########
@@ -103,25 +103,11 @@ case class LocalShuffleReaderExec(child: QueryStageExec)
extends UnaryExecNode {
override def output: Seq[Attribute] = child.output
- override def doCanonicalize(): SparkPlan = child.canonicalized
-
- override def outputPartitioning: Partitioning = {
-
- def tryReserveChildPartitioning(stage: ShuffleQueryStageExec):
Partitioning = {
- val initialPartitioning = stage.plan.child.outputPartitioning
- if (initialPartitioning.isInstanceOf[UnknownPartitioning]) {
- UnknownPartitioning(stage.plan.shuffleDependency.rdd.partitions.length)
- } else {
- initialPartitioning
- }
- }
-
- child match {
- case stage: ShuffleQueryStageExec =>
- tryReserveChildPartitioning(stage)
- case ReusedQueryStageExec(_, stage: ShuffleQueryStageExec, _) =>
- tryReserveChildPartitioning(stage)
- }
+ override def outputPartitioning: Partitioning = child match {
+ case stage: ShuffleQueryStageExec =>
+ stage.plan.child.outputPartitioning
+ case ReusedQueryStageExec(_, stage: ShuffleQueryStageExec, _) =>
+ stage.plan.child.outputPartitioning
Review comment:
Don't we need to `updateAttr` for outputPartitioning of
`ReusedQueryStageExec` here?
----------------------------------------------------------------
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]