Skip to content

Commit 493e96f

Browse files
committed
fix lint
1 parent be6c772 commit 493e96f

File tree

1 file changed

+1
-55
lines changed

1 file changed

+1
-55
lines changed

python/pyspark/sql/tests/arrow/test_arrow_udf_grouped_agg.py

Lines changed: 1 addition & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
#
1717

1818
import unittest
19-
from typing import cast
2019

2120
from pyspark.sql.pandas.functions import arrow_udf, ArrowUDFType
2221
from pyspark.util import PythonEvalType
@@ -30,8 +29,7 @@
3029
sum,
3130
udf,
3231
)
33-
from pyspark.sql.types import ArrayType, YearMonthIntervalType
34-
from pyspark.errors import AnalysisException, PySparkNotImplementedError, PythonException
32+
from pyspark.errors import AnalysisException, PythonException
3533
from pyspark.testing.sqlutils import (
3634
ReusedSQLTestCase,
3735
have_pyarrow,
@@ -186,58 +184,6 @@ def test_basic(self):
186184
).collect()
187185
self.assertEqual(expected4, result4.collect())
188186

189-
# def test_unsupported_types(self):
190-
# with self.quiet():
191-
# self.check_unsupported_types()
192-
#
193-
# def check_unsupported_types(self):
194-
# with self.assertRaises(PySparkNotImplementedError) as pe:
195-
# pandas_udf(
196-
# lambda x: x,
197-
# ArrayType(ArrayType(YearMonthIntervalType())),
198-
# ArrowUDFType.GROUPED_AGG,
199-
# )
200-
#
201-
# self.check_error(
202-
# exception=pe.exception,
203-
# errorClass="NOT_IMPLEMENTED",
204-
# messageParameters={
205-
# "feature": "Invalid return type with grouped aggregate Pandas UDFs: "
206-
# "ArrayType(ArrayType(YearMonthIntervalType(0, 1), True), True)"
207-
# },
208-
# )
209-
#
210-
# with self.assertRaises(PySparkNotImplementedError) as pe:
211-
#
212-
# @arrow_udf("mean double, std double", ArrowUDFType.GROUPED_AGG)
213-
# def mean_and_std_udf(v):
214-
# return v.mean(), v.std()
215-
#
216-
# self.check_error(
217-
# exception=pe.exception,
218-
# errorClass="NOT_IMPLEMENTED",
219-
# messageParameters={
220-
# "feature": "Invalid return type with grouped aggregate Pandas UDFs: "
221-
# "StructType([StructField('mean', DoubleType(), True), "
222-
# "StructField('std', DoubleType(), True)])"
223-
# },
224-
# )
225-
#
226-
# with self.assertRaises(PySparkNotImplementedError) as pe:
227-
#
228-
# @arrow_udf(ArrayType(YearMonthIntervalType()), ArrowUDFType.GROUPED_AGG)
229-
# def mean_and_std_udf(v): # noqa: F811
230-
# return {v.mean(): v.std()}
231-
#
232-
# self.check_error(
233-
# exception=pe.exception,
234-
# errorClass="NOT_IMPLEMENTED",
235-
# messageParameters={
236-
# "feature": "Invalid return type with grouped aggregate Pandas UDFs: "
237-
# "ArrayType(YearMonthIntervalType(0, 1), True)"
238-
# },
239-
# )
240-
241187
def test_alias(self):
242188
df = self.data
243189
mean_udf = self.arrow_agg_mean_udf

0 commit comments

Comments
 (0)