You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/02/11 04:14:19 UTC

[GitHub] cloud-fan commented on a change in pull request #22149: [SPARK-25158][SQL]Executor accidentally exit because ScriptTransformationWriterThread throw Exception.

cloud-fan commented on a change in pull request #22149: [SPARK-25158][SQL]Executor accidentally exit because ScriptTransformationWriterThread throw Exception.
URL: https://github.com/apache/spark/pull/22149#discussion_r255378566
 
 

 ##########
 File path: sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/SQLQuerySuite.scala
 ##########
 @@ -2348,4 +2354,30 @@ class SQLQuerySuite extends QueryTest with SQLTestUtils with TestHiveSingleton {
     }
   }
 
+  test("SPARK-25158: " +
+    "Executor accidentally exit because ScriptTransformationWriterThread throw Exception") {
+    withSQLConf("hive.script.recordwriter" ->
+      classOf[NonWritableRecordWriter].getCanonicalName) {
+      val defaultUncaughtExceptionHandler = Thread.getDefaultUncaughtExceptionHandler
+      try {
+        val uncaughtExceptionHandler = new TestUncaughtExceptionHandler
+        Thread.setDefaultUncaughtExceptionHandler(uncaughtExceptionHandler)
+        spark
+          .range(5)
+          .selectExpr("id AS a")
+          .createOrReplaceTempView("test")
 
 Review comment:
   wrap the code with `withTempView`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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