Re: [I] panic: date_trunc unwraps out-of-range lower-bound timestamp truncation [datafusion]

2026-05-27 Thread via GitHub


alamb closed issue #22214: panic: date_trunc unwraps out-of-range lower-bound 
timestamp truncation
URL: https://github.com/apache/datafusion/issues/22214


-- 
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]



Re: [I] panic: date_trunc unwraps out-of-range lower-bound timestamp truncation [datafusion]

2026-05-17 Thread via GitHub


Sean-Kenneth-Doherty commented on issue #22214:
URL: https://github.com/apache/datafusion/issues/22214#issuecomment-4469986856

   take


-- 
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]



[I] panic: date_trunc unwraps out-of-range lower-bound timestamp truncation [datafusion]

2026-05-15 Thread via GitHub


Dandandan opened a new issue, #22214:
URL: https://github.com/apache/datafusion/issues/22214

   ### Describe the bug
   
   `date_trunc` can panic during planning/constant folding for lower-bound 
nanosecond timestamps. Truncating to a coarser unit can produce a value outside 
Arrow's nanosecond timestamp range, and the code unwraps `None`.
   
   ### To Reproduce
   
   ```sql
   EXPLAIN SELECT date_trunc('year', TIMESTAMP '1677-09-22 00:00:00');
   ```
   
   ### Actual behavior
   
   ```text
   thread 'main' panicked at 
datafusion/functions/src/datetime/date_trunc.rs:649:14:
   called `Option::unwrap()` on a `None` value
   ```
   
   ### Expected behavior
   
   Return an error or NULL for an out-of-range truncated timestamp; do not 
panic.
   
   ### Notes
   
   Other coarse granularities near the lower nanosecond timestamp bound hit the 
same unwrap.


-- 
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]