dtenedor commented on code in PR #42157:
URL: https://github.com/apache/spark/pull/42157#discussion_r1275350920
##########
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:
I mentioned this in @ueshin's previous PR, it would be helpful to include
the UDTF name in the error message. Is it possible to add that now, or should
we separate that work to a later PR?
--
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]