Skip to content

Commit

Permalink
Update test_udtf.py
Browse files Browse the repository at this point in the history
  • Loading branch information
AngersZhuuuu committed Jun 21, 2024
1 parent 960370d commit 83cd788
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/pyspark/sql/tests/test_udtf.py
Original file line number Diff line number Diff line change
Expand Up @@ -2814,7 +2814,7 @@ def eval(self):
with self.assertRaisesRegex(PythonException, "UDTF_ARROW_TYPE_CAST_ERROR"):
udtf(TestUDTF, returnType=ret_type)().collect()

def test_udt_as_return_type(self):
def test_udtf_as_return_type(self):
class TestUDTF:
def eval(self):
yield ExamplePoint(0, 1),
Expand All @@ -2825,7 +2825,7 @@ def eval(self):
schema = StructType().add("point", ExamplePointUDT())
df = self.spark.createDataFrame([data], schema=schema)
[row] = df.select(
udtf(TestUDTF, returnType=ExamplePointUDT(), useArrow=True)("point"),
udtf(TestUDTF, returnType=schema, useArrow=True)("point"),
).collect()
self.assertEqual(row[0], ExamplePoint(1.0, 2.0))

Expand Down

0 comments on commit 83cd788

Please sign in to comment.