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 2020/04/16 10:42:43 UTC

[GitHub] [spark] AngersZhuuuu commented on a change in pull request #27724: [SPARK-30973][SQL] ScriptTransformationExec should wait for the termination …

AngersZhuuuu commented on a change in pull request #27724: [SPARK-30973][SQL] ScriptTransformationExec should wait for the termination …
URL: https://github.com/apache/spark/pull/27724#discussion_r409458999
 
 

 ##########
 File path: sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/ScriptTransformationSuite.scala
 ##########
 @@ -228,6 +228,26 @@ class ScriptTransformationSuite extends SparkPlanTest with SQLTestUtils with Tes
         'e.cast("string")).collect())
     }
   }
+
+  test("SPARK-30973: ScriptTransformationExec should wait for the termination of script") {
+    (0 until 10).foreach { _ =>
+      assume(TestUtils.testCommandAvailable("/bin/bash"))
+
+      val rowsDf = Seq("a", "b", "c").map(Tuple1.apply).toDF("a")
+      val e = intercept[SparkException] {
+        val plan =
+          new ScriptTransformationExec(
+            input = Seq(rowsDf.col("a").expr),
+            script = "some_non_existent_command",
 
 Review comment:
   > I tried some times in my Mac, this issue can not be reproduced by sleeping several seconds in the script. It is easy to reproduce this issue by this way [#27724 (comment)](https://github.com/apache/spark/pull/27724#issuecomment-607628004). So I add an UT by this code.
   
   You should notice that my UT is is without serde, if you want to add UT, I think you'd better add two type UT (with serde / without serde)

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