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

   ### Describe the bug
   
   `date_bin` panics during planning/constant folding when scaling an extreme 
`Time64(Microsecond)` origin value.
   
   ### To Reproduce
   
   ```sql
   EXPLAIN SELECT date_bin(
     INTERVAL '1 microsecond',
     arrow_cast(0, 'Time64(Microsecond)'),
     arrow_cast(9223372036854775807, 'Time64(Microsecond)')
   );
   ```
   
   ### Actual behavior
   
   ```text
   thread 'main' panicked at 
datafusion/functions/src/datetime/date_bin.rs:532:14:
   attempt to multiply with overflow
   ```
   
   ### Expected behavior
   
   Return a DataFusion error for the out-of-range origin conversion, not a 
panic.


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

Reply via email to