Description
When the return type of a UDTF is not an iterable, the error message can be confusing to users. For example for this UDTF:
@udtf(returnType="x: int") class TestUDTF: def eval(self, a): return a
Currently it fails with this error for regular UDTFs:
return tuple(map(verify_and_convert_result, res))
TypeError: 'int' object is not iterable
And this error for arrow-optimized UDTFs:
raise ValueError("DataFrame constructor not properly called!")
ValueError: DataFrame constructor not properly called!