allisonwang-db commented on code in PR #42157:
URL: https://github.com/apache/spark/pull/42157#discussion_r1276577525
##########
python/pyspark/sql/tests/test_udtf.py:
##########
@@ -256,29 +254,76 @@ def eval(self, a: int):
):
TestUDTF(lit(1), lit(2)).collect()
+ def test_udtf_init_with_additional_args(self):
+ @udtf(returnType="x int")
+ class TestUDTF:
+ def __init__(self, a: int):
+ ...
+
+ def eval(self, a: int):
+ yield a,
+
+ with self.assertRaisesRegex(
+ PythonException, r"__init__\(\) missing 1 required positional
argument: 'a'"
Review Comment:
Yup here is the Jira ticket to add UDTF name in the error message:
https://issues.apache.org/jira/browse/SPARK-44008
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]