cfmcgrady commented on a change in pull request #31156:
URL: https://github.com/apache/spark/pull/31156#discussion_r556466859



##########
File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/SQLExecution.scala
##########
@@ -91,14 +91,25 @@ object SQLExecution {
         var ex: Option[Throwable] = None
         val startTime = System.nanoTime()
         try {
-          sc.listenerBus.post(SparkListenerSQLExecutionStart(
+
+          // queryExecution.executedPlan may throw an exception and made the 
send event message
+          // failed. we should send SparkListenerSQLExecutionStart event to 
listener bus when we
+          // catch an exception.
+          val sparkPlanInfo = try {

Review comment:
       We use `SparkListenerSQLExecutionStart` event to add 
`ExecutionListenerBus.activeQueryExecutionIds` here, if we don't send 
`SparkListenerSQLExecutionStart` event messages when an exception throw, some 
tests will be failed.




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



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

Reply via email to