Describe the bug
date_bin can panic during planning/constant folding when it scales an extreme non-nanosecond timestamp source to nanoseconds.
To Reproduce
EXPLAIN SELECT date_bin(
INTERVAL '1 nanosecond',
arrow_cast(9223372036854775807, 'Timestamp(Second, None)'),
TIMESTAMP '1970-01-01 00:00:00'
);
Actual behavior
thread 'main' panicked at datafusion/functions/src/datetime/date_bin.rs:585:47:
attempt to multiply with overflow
Expected behavior
Return a planning error for an out-of-range timestamp conversion instead of panicking.
Notes
This is the source timestamp conversion path; origin conversion has a separate panic site.
Describe the bug
date_bincan panic during planning/constant folding when it scales an extreme non-nanosecond timestamp source to nanoseconds.To Reproduce
Actual behavior
Expected behavior
Return a planning error for an out-of-range timestamp conversion instead of panicking.
Notes
This is the source timestamp conversion path; origin conversion has a separate panic site.