[
https://issues.apache.org/jira/browse/SPARK-62078?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Hyukjin Kwon resolved SPARK-62078.
----------------------------------
Fix Version/s: connect-rust-4.4.0
Resolution: Fixed
Issue resolved by pull request 884
[https://github.com/apache/spark-connect-rust/pull/884]
> The methods of the UDF and UDTF registrations and of the streaming classes
> lack the docstrings that PySpark Connect copies of PySpark's classic classes,
> in the Python client
> -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: SPARK-62078
> URL: https://issues.apache.org/jira/browse/SPARK-62078
> Project: Spark
> Issue Type: Bug
> Components: Connect
> Affects Versions: 5.0.0
> Reporter: Hyukjin Kwon
> Assignee: Hyukjin Kwon
> Priority: Major
> Labels: pull-request-available
> Fix For: connect-rust-4.4.0
>
>
> PySpark Connect's modules give the methods of their classes the docstrings of
> PySpark's classic classes:
> - python/pyspark/sql/connect/udf.py:331-346: `register.__doc__ =
> PySparkUDFRegistration.register.__doc__`, and the same of
> registerJavaFunction and registerJavaUDAF;
> - python/pyspark/sql/connect/udtf.py:253: `register.__doc__ =
> PySparkUDTFRegistration.register.__doc__`;
> - python/pyspark/sql/connect/streaming/query.py:59-253: 12 members of
> StreamingQuery (id, runId, name, isActive, awaitTermination, status,
> recentProgress, lastProgress, processAllAvailable, stop, explain, exception)
> and 6 of StreamingQueryManager (active, get, awaitAnyTermination,
> resetTerminated, addListener, removeListener);
> - python/pyspark/sql/connect/streaming/readwriter.py:72-765: 14 methods of
> DataStreamReader (format, schema, option, options, name, load, json, orc,
> parquet, text, csv, xml, table, changes) and the class itself
> (`DataStreamReader.__doc__ = PySparkDataStreamReader.__doc__`), and 12 of
> DataStreamWriter (outputMode, format, option, options, partitionBy,
> clusterBy, queryName, trigger, foreach, foreachBatch, start, toTable).
> The drop-in's members have docstrings of their own, or none, for all 49 of
> them. Repro: `help(spark.udf.register)`, `spark.readStream.format.__doc__`,
> `type(spark.streams).active.__doc__`.
> - pyspark-client: PySpark's documentation, of 4536, 1161 and 793 characters,
> with its parameters, notes and examples.
> - The drop-in: "Register a Python UDF with the given name. ..." of 789
> characters, "Set the source format. As PySpark's, None unsets it, ..." of 97,
> and None.
> The registrations of the drop-in are Python classes, which can assign the
> docstrings as PySpark Connect does, as SPARK-62071 vendored the classic
> pyspark.sql.udf and pyspark.sql.udtf. The streaming classes are native, whose
> docstrings are those that the extension is built with.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]