I'm new to pysaprk, so I have a function and I've written unit test for it, and I have defined a UDF function by using this function for pyspark, something like:
udf_my_function = udf(lambda s: my_function(s), StringType())
My question is if I already have the unit test for my_function()
, do I need a unit test for udf_my_function
? If so, how can I write it? Any relevant articles or links will also be appreciated? Many thanks.