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

    https://github.com/apache/spark/pull/19325#discussion_r140623282
  
    --- Diff: python/pyspark/sql/tests.py ---
    @@ -3308,12 +3306,12 @@ def test_vectorized_udf_invalid_length(self):
             from pyspark.sql.functions import pandas_udf, col
             import pandas as pd
             df = self.spark.range(10)
    -        raise_exception = pandas_udf(lambda: pd.Series(1), LongType())
    +        raise_exception = pandas_udf(lambda i: pd.Series(1), LongType())
             with QuietTest(self.sc):
                 with self.assertRaisesRegexp(
                         Exception,
    --- End diff --
    
    Here too, while we are here, let's catch narrower exception type. Looks 
`RuntimeError`.


---

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

Reply via email to