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: [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