Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion python/pyspark/sql/tests/pandas/test_pandas_udf_scalar.py
Original file line number Diff line number Diff line change
Expand Up @@ -677,8 +677,13 @@ def test_vectorized_udf_invalid_length(self):
def check_vectorized_udf_invalid_length(self):
df = self.spark.range(10)
raise_exception = pandas_udf(lambda _: pd.Series(1), LongType())
# Accept both this branch's SCHEMA_MISMATCH_FOR_PANDAS_UDF message and the
# RESULT_ROWS_MISMATCH message a newer server raises (SPARK-58529), so the
# cross-version old-client job passes against a master server.
with self.assertRaisesRegex(
Exception, "Result vector from pandas_udf was not the required length"
Exception,
"Result vector from pandas_udf was not the required length"
"|The number of output rows.*must match the number of input rows",
):
df.select(raise_exception(col("id"))).collect()

Expand Down