You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "stevomitric (via GitHub)" <gi...@apache.org> on 2026/09/09 08:59:57 UTC
[PR] [SPARK-57846][SQL] Add the try_make_time function [spark]
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: 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-57846][SQL] Add the try_make_time function [spark]
Posted by "stevomitric (via GitHub)" <gi...@apache.org>.
stevomitric closed pull request #58655: [SPARK-57846][SQL] Add the try_make_time function
URL: https://github.com/apache/spark/pull/58655
--
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-57846][SQL] Add the try_make_time function [spark]
Posted by "stevomitric (via GitHub)" <gi...@apache.org>.
stevomitric commented on PR #58655:
URL: https://github.com/apache/spark/pull/58655#issuecomment-5605873677
cc @uros-b could you PTAL when you get a chance.
--
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