You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "zhengruifeng (via GitHub)" <gi...@apache.org> on 2026/06/09 12:16:29 UTC
[PR] [PYSPARK][DOC] Improve See Also cross-references in pyspark.sql.functions [spark]
zhengruifeng opened a new pull request, #56404:
URL: https://github.com/apache/spark/pull/56404
### What changes were proposed in this pull request?
Improve `See Also` cross-references in `pyspark/sql/functions/builtin.py` across three categories:
**Fix broken links** (referenced functions that don't exist):
- `var_samp`: `std_samp` → `stddev_samp`
- `var_pop`: `std_pop` → `stddev_pop`
**Add new `See Also` sections** (functions that had none):
| Category | Functions |
|---|---|
| Math aliases | `ceil` ↔ `ceiling`, `sign` ↔ `signum`, `log` ↔ `ln` |
| String aliases | `lcase`, `ucase`, `length` / `char_length` / `character_length`, `printf` |
| Try variants | `to_binary` ↔ `try_to_binary`, `to_number` ↔ `try_to_number` |
| Aggregates | `avg`, `sum`, `median`, `count_distinct`, `uniform` |
**Add missing symmetric cross-references** to existing `See Also` sections:
| Function | Added |
|---|---|
| `lower`, `upper` | `lcase`, `ucase` (alias back-links) |
| `variance` | `std` |
| `getbit` | `bit_count` |
| `get` | `try_element_at` |
| `substr` | `locate` |
| `day` | `weekday` |
| `dayofyear` | `dayofweek` |
| `weekday` | `dayofweek`, `dayofyear`, `dayofmonth` |
| `date_add`, `dateadd` | `add_months` |
| `date_diff`, `timestamp_diff` | `time_diff` |
| `to_date` ↔ `try_to_date` | each other |
| `to_timestamp_ltz`, `to_timestamp_ntz` | `try_to_timestamp` |
| `try_to_timestamp` | `try_to_date`, `try_to_time` |
| `bitmap_construct_agg` | `bitmap_and_agg` |
### Why are the changes needed?
The broken links produce dead references in the generated API docs (e.g., https://spark.apache.org/docs/latest/api/python/reference/pyspark.sql/api/pyspark.sql.functions.var_samp.html). The missing cross-references make it harder for users to discover related functions when browsing the API documentation.
### Does this PR introduce _any_ user-facing change?
No. Documentation-only changes.
### How was this patch tested?
Verified programmatically that all referenced function names resolve to actual definitions or re-exported names in `pyspark.sql.functions`.
### Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Sonnet 4.6
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-57367][PYTHON][DOC] Improve See Also cross-references in pyspark.sql.functions [spark]
Posted by "zhengruifeng (via GitHub)" <gi...@apache.org>.
zhengruifeng closed pull request #56404: [SPARK-57367][PYTHON][DOC] Improve See Also cross-references in pyspark.sql.functions
URL: https://github.com/apache/spark/pull/56404
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-57367][PYTHON][DOC] Improve See Also cross-references in pyspark.sql.functions [spark]
Posted by "zhengruifeng (via GitHub)" <gi...@apache.org>.
zhengruifeng commented on PR #56404:
URL: https://github.com/apache/spark/pull/56404#issuecomment-4669689811
thanks, merged to master/4.x
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org