Skip to content

Commit

Permalink
Update test_udtf.py
Browse files Browse the repository at this point in the history
AngersZhuuuu committed Jun 24, 2024
1 parent 26ff104 commit 57e0c8a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions python/pyspark/sql/tests/test_udtf.py
Original file line number Diff line number Diff line change
@@ -2817,12 +2817,10 @@ def eval(self):
def test_udt_as_udtf_return_type(self):
class TestUDTF:
def eval(self):
yield ExamplePoint(0, 1),
yield Row(point=ExamplePoint(0, 1)),

schema = StructType().add("point", ExamplePointUDT())
func = udtf(TestUDTF, returnType=schema, useArrow=True)
[row] = func().collect()
self.assertEqual(row[0], ExamplePoint(1.0, 2.0))
self._check_result_or_exception(TestUDTF, schema, [Row(point=ExamplePoint(1.0, 2.0))])


class UDTFArrowTests(UDTFArrowTestsMixin, ReusedSQLTestCase):

0 comments on commit 57e0c8a

Please sign in to comment.