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

   ### What changes were proposed in this pull request?
   Adds `try_make_time(hour, minute, second)`, the error-safe counterpart of 
`make_time`: it returns NULL instead of throwing when the fields are out of 
range. Implemented as a builder that wraps `MakeTime` in `TryEval`, mirroring 
`try_to_time`. This is a SQL-registry function; the DataFrame/PySpark APIs are 
left as a follow-up.
   
   
   ### Why are the changes needed?
   `make_time` throws on invalid input, but there was no `try_` variant, unlike 
`to_time`/`try_to_time` and `make_timestamp`/`try_make_timestamp`. This closes 
that gap in the TIME function family (SPARK-57550 umbrella).
   
   
   ### Does this PR introduce _any_ user-facing change?
   Yes, a new SQL function
   
   
   ### How was this patch tested?
   catalyst `TimeExpressionsSuite` (null-on-invalid), golden cases in 
`time.sql`, and the regenerated `sql-expression-schema.md` row.
   
   
   ### Was this patch authored or co-authored using generative AI tooling?
   Co-authored-by: Claude 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