Description
Support UDTFs with empty schema, for example:
>>> class TestUDTF: ... def eval(self): ... yield tuple()
Currently it fails with `useArrow=True`:
>>> udtf(TestUDTF, returnType=StructType())().collect() Traceback (most recent call last): ... ValueError: not enough values to unpack (expected 2, got 0)
whereas without Arrow:
>>> udtf(TestUDTF, returnType=StructType(), useArrow=False)().collect()
[Row()]
Otherwise, we should raise an error without Arrow, too, to be consistent.