LuciferYang opened a new pull request, #57334:
URL: https://github.com/apache/spark/pull/57334

   ### What changes were proposed in this pull request?
   
   Corrects copy-paste scaladoc defects in `sql/api`'s `functions.scala` where 
the doc text
   contradicts the function signature or the function's actual semantics:
   
   - `regr_avgy`: "average of the independent variable" -> "dependent variable" 
(it averages `y`,
     which the same sentence defines as the dependent variable; the summary was 
pasted from
     `regr_avgx`).
   - `any_value(e, ignoreNulls)`: the description referenced `isIgnoreNull`, 
which is not a
     parameter -> `ignoreNulls`.
   - `ceil(columnName)`: referenced `` `e` `` (the parameter of the `ceil(e: 
Column)` overload) ->
     `columnName`; matches the corrected `floor(columnName)` sibling.
   - `bitmap_bit_position` / `bitmap_bucket_number`: the two summaries were 
transposed; each is now
     aligned with its catalyst expression (`BitmapBitPosition` / 
`BitmapBucketNumber`).
   - `datediff` / `date_diff`: the examples called `dateddiff(...)` (a 
nonexistent function) -> the
     actual function name.
   - `to_timestamp_ltz` (both overloads): "to a timestamp without time zone" -> 
"with local time
     zone". The builder injects `TimestampType` (TIMESTAMP WITH LOCAL TIME 
ZONE); the wording was
     pasted from the adjacent `to_timestamp_ntz` docs.
   - `reduce` (both overloads): the examples called `aggregate(...)` -> 
`reduce(...)`.
   
   ### Why are the changes needed?
   
   The scaladoc misdescribes these functions. Most are harmless wrong names in 
examples, but
   `to_timestamp_ltz` documenting "without time zone" actively misleads about 
the return type
   (it produces a timestamp with local time zone), and the transposed 
`bitmap_*` summaries point
   users to the wrong function.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No. Documentation-only change to scaladoc comments.
   
   ### How was this patch tested?
   
   No tests; scaladoc-only change. Each correction was verified against the 
function signature and,
   where semantics were involved (`to_timestamp_ltz`, `bitmap_*`), against the 
corresponding catalyst
   expression builder/definition. Checked the changed lines stay within 100 
chars and introduce no
   non-ASCII characters.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code (Opus 4.8)
   


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