xinrong-meng commented on code in PR #48949:
URL: https://github.com/apache/spark/pull/48949#discussion_r1857684067


##########
python/pyspark/sql/tests/test_udtf.py:
##########
@@ -74,26 +74,23 @@ def eval(self):
                 yield "hello", "world"
 
         func = udtf(TestUDTF, returnType="c1: string, c2: string")
-        rows = func().collect()
-        self.assertEqual(rows, [Row(c1="hello", c2="world")])
+        assertDataFrameEqual(func(), [Row(c1="hello", c2="world")])

Review Comment:
   That’s a wise alternative to minimize code changes. Since I also want to 
remove the “collect” in the test cases, I think replacing it with 
assertDataFrameEqual is more intuitive and straightforward.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to