Github user icexelloss commented on a diff in the pull request:

    https://github.com/apache/spark/pull/21383#discussion_r190761062
  
    --- Diff: python/pyspark/sql/tests.py ---
    @@ -900,6 +900,17 @@ def __call__(self, x):
             self.assertEqual(f, f_.func)
             self.assertEqual(return_type, f_.returnType)
     
    +    def test_stopiteration_in_udf(self):
    +        # test for SPARK-23754
    +        from pyspark.sql.functions import udf
    +        from py4j.protocol import Py4JJavaError
    +
    +        def foo(x):
    +            raise StopIteration()
    +
    +        with self.assertRaises(Py4JJavaError):
    --- End diff --
    
    Can we check for error message here?


---

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

Reply via email to