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 2019/08/16 15:08:57 UTC
[GitHub] [spark] cloud-fan commented on a change in pull request #25456:
[SPARK-28739][SQL] Add a simple cost check for Adaptive Query Execution
cloud-fan commented on a change in pull request #25456: [SPARK-28739][SQL] Add a simple cost check for Adaptive Query Execution
URL: https://github.com/apache/spark/pull/25456#discussion_r314762909
##########
File path: sql/core/src/main/scala/org/apache/spark/sql/execution/adaptive/AdaptiveSparkPlanExec.scala
##########
@@ -317,22 +345,21 @@ case class AdaptiveSparkPlanExec(
*/
private def updateLogicalPlan(
logicalPlan: LogicalPlan,
- newStages: Seq[(Exchange, QueryStageExec)]): LogicalPlan = {
+ newStages: Seq[QueryStageExec]): LogicalPlan = {
var currentLogicalPlan = logicalPlan
newStages.foreach {
- case (exchange, stage) =>
- // Get the corresponding logical node for `exchange`. If `exchange` has been transformed
- // from a `Repartition`, it should have `logicalLink` available by itself; otherwise
- // traverse down to find the first node that is not generated by `EnsureRequirements`.
- val logicalNodeOpt = exchange.logicalLink.orElse(exchange.collectFirst {
- case p if p.logicalLink.isDefined => p.logicalLink.get
- })
+ case stage if currentPhysicalPlan.find(_.eq(stage)).isDefined =>
Review comment:
will `currentPhysicalPlan.find(_.eq(stage))` be empty?
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org