anishshri-db commented on code in PR #59276:
URL: https://github.com/apache/spark/pull/59276#discussion_r4235448391


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/runtime/StreamExecution.scala:
##########
@@ -376,22 +376,33 @@ abstract class StreamExecution(
           e
         }
 
-        streamDeathCause = new StreamingQueryException(
-          toDebugString(includeLogicalPlan = isInitialized),
-          cause = cause,
-          getLatestExecutionContext().startOffsets
-            .toOffsets(sources.toSeq, sourceToIdMap.map(_.swap),
-              getLatestExecutionContext().offsetSeqMetadata)
-            .toString,
-          getLatestExecutionContext().endOffsets
-            .toOffsets(sources.toSeq, sourceToIdMap.map(_.swap),
-              getLatestExecutionContext().offsetSeqMetadata)
-            .toString,
-          errorClass = "STREAM_FAILED",
-          messageParameters = Map(
-            "id" -> id.toString,
-            "runId" -> runId.toString,
-            "message" -> message))
+        try {
+          streamDeathCause = new StreamingQueryException(

Review Comment:
   Can we just move this to a separate function and move the try catch block 
there itself ? just do the cause assignment here



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