WeichenXu123 commented on a change in pull request #24643: [SPARK-26412][PySpark][SQL] Allow Pandas UDF to take an iterator of pd.Series or an iterator of tuple of pd.Series URL: https://github.com/apache/spark/pull/24643#discussion_r293828520
########## File path: python/pyspark/sql/tests/test_pandas_udf_scalar.py ########## @@ -136,84 +150,115 @@ def test_register_nondeterministic_vectorized_udf_basic(self): [row] = self.spark.sql("SELECT randomPandasUDF(1)").collect() self.assertEqual(row[0], 7) + def random_iter_udf(it): + for i in it: + yield random.randint(6, 6) + i Review comment: The master test code is `random.randint(6, 6)`, I guess they want the test to keep deterministic. The "random.randint" is just a hint for the udf is random ? ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org