kosiew commented on code in PR #22823:
URL: https://github.com/apache/datafusion/pull/22823#discussion_r3456632960
##########
datafusion/functions/src/datetime/date_bin.rs:
##########
@@ -756,11 +765,11 @@ fn date_bin_impl(
}
let array = array.as_primitive::<Time64NanosecondType>();
let result: PrimitiveArray<Time64NanosecondType> =
- array.unary_opt(|x| {
+ array.try_unary(|x| {
stride_fn(stride, x, origin)
.map(|binned_nanos| binned_nanos %
(NANOSECONDS_IN_DAY))
- .ok()
- });
+ .map_err(|e|
ArrowError::ComputeError(e.to_string()))
Review Comment:
No, this path should not start surfacing row-level binning errors.
`Time64Nanosecond` needs no scaling and was out of scope; existing behavior
converted per-row `stride_fn` errors to `NULL`.
I’ll restore this array path to `unary_opt(... .ok())`, matching the scalar
`Time64Nanosecond` path and preserving behavior.
--
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]