You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/06/02 23:43:22 UTC
[GitHub] [spark] wangyum commented on a change in pull request #32741: [SPARK-35568][SQL] Add the BroadcastExchange after re-optimizing the physical plan to fix the UnsupportedOperationException when enabling both AQE and DPP.
wangyum commented on a change in pull request #32741:
URL: https://github.com/apache/spark/pull/32741#discussion_r644387742
##########
File path: sql/core/src/main/scala/org/apache/spark/sql/execution/adaptive/AdaptiveSparkPlanExec.scala
##########
@@ -312,6 +312,7 @@ case class AdaptiveSparkPlanExec(
}
override def doExecuteBroadcast[T](): broadcast.Broadcast[T] = {
+ assert(getFinalPhysicalPlan().isInstanceOf[BroadcastExchangeExec])
getFinalPhysicalPlan().doExecuteBroadcast()
Review comment:
`getFinalPhysicalPlan()` seems heavy. Can we change it to the following:
```scala
val plan = getFinalPhysicalPlan()
assert(plan.isInstanceOf[BroadcastExchangeExec])
plan.doExecuteBroadcast()
```
--
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org