This is an automated email from the ASF dual-hosted git repository.
zhengruifeng pushed a commit to branch branch-4.2
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/branch-4.2 by this push:
new d1037101591a [SPARK-57070][PYTHON][DOC] Add `time_(from|to)_*`
functions to Python API reference
d1037101591a is described below
commit d1037101591a3b3d8bc5ac9fd5ba6a6dc2754266
Author: Ruifeng Zheng <[email protected]>
AuthorDate: Wed May 27 13:30:47 2026 +0800
[SPARK-57070][PYTHON][DOC] Add `time_(from|to)_*` functions to Python API
reference
### What changes were proposed in this pull request?
Add the six time numeric conversion functions to the PySpark Python API
reference (`python/docs/source/reference/pyspark.sql/functions.rst`):
- `time_from_seconds`
- `time_from_millis`
- `time_from_micros`
- `time_to_seconds`
- `time_to_millis`
- `time_to_micros`
### Why are the changes needed?
These functions were added in Spark 4.2 (SPARK-54442) and are exported from
`pyspark.sql.functions`, but the entries were missing from the API reference
autosummary, so they do not show up in the rendered Python docs.
### Does this PR introduce _any_ user-facing change?
Documentation-only change; the functions themselves are unchanged.
### How was this patch tested?
Docs-only change. Verified the new entries are in alphabetical order,
matching the order in `python/pyspark/sql/functions/__init__.py`.
### Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Code (model: claude-opus-4-7)
Closes #56115 from zhengruifeng/spark-doc-dev2.
Authored-by: Ruifeng Zheng <[email protected]>
Signed-off-by: Ruifeng Zheng <[email protected]>
(cherry picked from commit 04ce453e3de194da54bcb09b40c2d7fa5db22f6d)
Signed-off-by: Ruifeng Zheng <[email protected]>
---
python/docs/source/reference/pyspark.sql/functions.rst | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/python/docs/source/reference/pyspark.sql/functions.rst
b/python/docs/source/reference/pyspark.sql/functions.rst
index d6810722e79a..bf9e055d128e 100644
--- a/python/docs/source/reference/pyspark.sql/functions.rst
+++ b/python/docs/source/reference/pyspark.sql/functions.rst
@@ -301,6 +301,12 @@ Date and Timestamp Functions
timestamp_seconds
time_bucket
time_diff
+ time_from_micros
+ time_from_millis
+ time_from_seconds
+ time_to_micros
+ time_to_millis
+ time_to_seconds
time_trunc
to_date
to_time
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]