miland-db commented on code in PR #49726:
URL: https://github.com/apache/spark/pull/49726#discussion_r1955207027


##########
sql/core/src/test/scala/org/apache/spark/sql/scripting/SqlScriptingExecutionSuite.scala:
##########
@@ -69,6 +70,222 @@ class SqlScriptingExecutionSuite extends QueryTest with 
SharedSparkSession {
     }
   }
 
+  // Signal tests
+  test("signal statement - condition") {
+    val sqlScript =
+      """
+        |BEGIN
+        |  DECLARE TEST_CONDITION CONDITION FOR SQLSTATE '12345';
+        |  SIGNAL TEST_CONDITION;
+        |END
+        |""".stripMargin
+    val exception = intercept[SqlScriptingRuntimeException] {
+      verifySqlScriptResult(sqlScript, Seq.empty)
+    }
+    checkError(

Review Comment:
   Yes, I tried locally executing the test (without catching the exception), 
and also tried the same thing from the `spark-shell`. Is there a way to 
automatically test this - checking if the expected substring is in error 
message is the most obvious way to me. I am not sure if I should test it that 
way.



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

Reply via email to