Github user ueshin commented on a diff in the pull request:
https://github.com/apache/spark/pull/20171#discussion_r160318854
--- Diff: python/pyspark/sql/tests.py ---
@@ -3616,6 +3616,34 @@ def test_vectorized_udf_basic(self):
bool_f(col('bool')))
self.assertEquals(df.collect(), res.collect())
+ def test_register_vectorized_udf_basic(self):
+ from pyspark.sql.functions import pandas_udf
+ from pyspark.rdd import PythonEvalType
+ twoArgsPandasUDF = pandas_udf(lambda x: len(x), IntegerType())
--- End diff --
`x.str.len()` instead of `len(x)`?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]