ueshin commented on code in PR #41948:
URL: https://github.com/apache/spark/pull/41948#discussion_r1267278691


##########
python/pyspark/sql/functions.py:
##########
@@ -15564,6 +15566,36 @@ def udtf(
     |  1|  2|
     +---+---+
 
+    UDTF can also have `analyze` static method instead of a static return type:
+
+    The `analyze` static method should take arguments:
+
+    - The number and order of arguments are the same as the UDTF inputs
+    - Each argument is a :class:`pyspark.sql.udtf.AnalyzeArgument`, containing:
+      - data_type: DataType
+      - value: Any: if the argument is foldable; otherwise None
+      - is_table: bool: True if the argument is TABLE
+
+    and return a :class:`pyspark.sql.udtf.AnalyzeResult`, containing.

Review Comment:
   Added the import in the example.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to