HyukjinKwon commented on a change in pull request #27165:
[SPARK-28264][PYTHON][SQL] Support type hints in pandas UDF and rename/move
inconsistent pandas UDF types
URL: https://github.com/apache/spark/pull/27165#discussion_r365109478
##########
File path: python/pyspark/sql/tests/test_pandas_cogrouped_map.py
##########
@@ -180,59 +176,26 @@ def left_assign_key(key, l, _):
assert_frame_equal(expected, result,
check_column_type=_check_column_type)
def test_wrong_return_type(self):
- with QuietTest(self.sc):
- with self.assertRaisesRegexp(
- NotImplementedError,
- 'Invalid returnType.*cogrouped map Pandas UDF.*MapType'):
- pandas_udf(
- lambda l, r: l,
- 'id long, v map<int, int>',
- PandasUDFType.COGROUPED_MAP)
-
- def test_wrong_args(self):
# Test that we get a sensible exception invalid values passed to apply
left = self.data1
right = self.data2
with QuietTest(self.sc):
- # Function rather than a udf
Review comment:
`groupby.cogroup.applyInPandas` now always sets the right eval type
internally. So we don't have to worry about mis-typed UDF.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]