This is an automated email from the ASF dual-hosted git repository. ueshin pushed a commit to branch branch-3.5 in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/branch-3.5 by this push: new d0ad48334dc Revert "[SPARK-44380][PYTHON][FOLLOWUP] Set __doc__ for analyze static method when Arrow is enabled" d0ad48334dc is described below commit d0ad48334dccb451a0312c45ffe142b533ae75f9 Author: Takuya UESHIN <ues...@databricks.com> AuthorDate: Mon Jul 24 10:11:18 2023 -0700 Revert "[SPARK-44380][PYTHON][FOLLOWUP] Set __doc__ for analyze static method when Arrow is enabled" This reverts commit 07d3e8e52878ea9631d4757b67119a18fbdf0230. --- python/pyspark/sql/tests/test_udtf.py | 8 +------- python/pyspark/sql/udtf.py | 3 --- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/python/pyspark/sql/tests/test_udtf.py b/python/pyspark/sql/tests/test_udtf.py index 0fdb1c9b8a1..2c76d2f7e15 100644 --- a/python/pyspark/sql/tests/test_udtf.py +++ b/python/pyspark/sql/tests/test_udtf.py @@ -728,11 +728,6 @@ class BaseUDTFTestsMixin: """Initialize the UDTF""" ... - @staticmethod - def analyze(x: AnalyzeArgument) -> AnalyzeResult: - """Analyze the argument.""" - ... - def eval(self, x: int): """Evaluate the input row.""" yield x + 1, @@ -741,10 +736,9 @@ class BaseUDTFTestsMixin: """Terminate the UDTF.""" ... - cls = udtf(TestUDTF).func + cls = udtf(TestUDTF, returnType="y: int").func self.assertIn("A UDTF for test", cls.__doc__) self.assertIn("Initialize the UDTF", cls.__init__.__doc__) - self.assertIn("Analyze the argument", cls.analyze.__doc__) self.assertIn("Evaluate the input row", cls.eval.__doc__) self.assertIn("Terminate the UDTF", cls.terminate.__doc__) diff --git a/python/pyspark/sql/udtf.py b/python/pyspark/sql/udtf.py index e930daa9f51..3ab74193093 100644 --- a/python/pyspark/sql/udtf.py +++ b/python/pyspark/sql/udtf.py @@ -134,9 +134,6 @@ def _vectorize_udtf(cls: Type) -> Type: if hasattr(cls, "terminate"): getattr(vectorized_udtf, "terminate").__doc__ = getattr(cls, "terminate").__doc__ - if hasattr(vectorized_udtf, "analyze"): - getattr(vectorized_udtf, "analyze").__doc__ = getattr(cls, "analyze").__doc__ - return vectorized_udtf --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org