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

   ### Describe the bug
   
   `date_bin` can panic during planning/constant folding when it scales an 
extreme non-nanosecond timestamp source to nanoseconds.
   
   ### To Reproduce
   
   ```sql
   EXPLAIN SELECT date_bin(
     INTERVAL '1 nanosecond',
     arrow_cast(9223372036854775807, 'Timestamp(Second, None)'),
     TIMESTAMP '1970-01-01 00:00:00'
   );
   ```
   
   ### Actual behavior
   
   ```text
   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.


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