maryannxue commented on a change in pull request #27752: [SPARK-30999][SQL] Don't cancel a QueryStageExec which failed before call doMaterialize URL: https://github.com/apache/spark/pull/27752#discussion_r387067708
########## File path: sql/core/src/main/scala/org/apache/spark/sql/execution/adaptive/AdaptiveSparkPlanExec.scala ########## @@ -176,7 +176,10 @@ case class AdaptiveSparkPlanExec( } }(AdaptiveSparkPlanExec.executionContext) } catch { - case e: Throwable => events.offer(StageFailure(stage, e)) + case e: Throwable => + errors.prepend( + new SparkException(s"Early failed query stage found: ${stage.treeString}", e)) + cleanUpAndThrowException(errors, Some(stage.id)) Review comment: nit (and apologize for my previous mistake): at this point, we won't have any other errors, lets simplify it to: ``` val ex = new SparkException(s"Early failed query stage found: ${stage.treeString}", e)) cleanUpAndThrowException(Seq(ex), Some(stage.id)) ``` ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org