[GitHub] [spark] cloud-fan commented on a diff in pull request #37931: [SPARK-40488] Do not wrap exceptions thrown when datasource write fails

2022-09-20 Thread GitBox


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


##
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/continuous/WriteToContinuousDataSourceExec.scala:
##
@@ -65,14 +61,7 @@ case class WriteToContinuousDataSourceExec(write: 
StreamingWrite, query: SparkPl
 } catch {
   case _: InterruptedException =>
 // Interruption is how continuous queries are ended, so accept and 
ignore the exception.
-  case cause: Throwable =>
-cause match {
-  // Do not wrap interruption exceptions that will be handled by 
streaming specially.
-  case _ if StreamExecution.isInterruptionException(cause, 
sparkContext) => throw cause
-  // Only wrap non fatal exceptions.
-  case NonFatal(e) => throw 
QueryExecutionErrors.writingJobAbortedError(e)
-  case _ => throw cause
-}
+  case cause: Throwable => throw cause

Review Comment:
   since we can simply remove this line?



-- 
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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] [spark] cloud-fan commented on a diff in pull request #37931: [SPARK-40488] Do not wrap exceptions thrown when datasource write fails

2022-09-20 Thread GitBox


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


##
core/src/test/scala/org/apache/spark/SparkThrowableSuite.scala:
##
@@ -209,22 +209,6 @@ class SparkThrowableSuite extends SparkFunSuite {
 }
   }
 
-  test("Try catching SparkError with error class") {
-try {
-  throw new SparkException(
-errorClass = "WRITING_JOB_ABORTED",

Review Comment:
   we need to keep this test,  but with a different error class



-- 
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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org