cloud-fan commented on code in PR #42481:
URL: https://github.com/apache/spark/pull/42481#discussion_r1316817958


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/SQLExecution.scala:
##########
@@ -116,6 +119,15 @@ object SQLExecution {
         var ex: Option[Throwable] = None
         val startTime = System.nanoTime()
         try {
+          val planInfo = try {
+            SparkPlanInfo.fromSparkPlan(queryExecution.executedPlan)
+          } catch {
+            case NonFatal(e) =>
+              logDebug("Failed to generate SparkPlanInfo", e)

Review Comment:
   I think I know where the problem is: We already triggered the analysis and 
failed, and then invoke `withNewExecutionId`. However, within 
`withNewExecutionId`, we don't know that the analysis has failed, and called 
`queryExecution.executedPlan` which triggers the analysis again.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to