Sean-Kenneth-Doherty opened a new pull request, #22303: URL: https://github.com/apache/datafusion/pull/22303
## Which issue does this PR close? - Closes #22214. ## Rationale for this change Truncating a near-lower-bound nanosecond timestamp to a coarser calendar unit can produce a timestamp outside Arrow's nanosecond range. already used fallible timestamp conversion, but it unwrapped the final conversion back to nanoseconds and could panic. ## What changes are included in this PR? - Convert the final out-of-range truncation case into a DataFusion execution error. - Add a small string helper for user-facing granularity names in the error. - Add a unit regression and a sqllogictest regression for lower-bound nanosecond truncation. ## Are these changes tested? Yes: - - - running 1 test test datetime::date_trunc::tests::date_trunc_out_of_range_lower_bound_returns_error ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 282 filtered out; finished in 0.12s - - ## Are there any user-facing changes? Instead of panicking, out-of-range results now return an error. -- 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]
