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

   ### Describe the bug
   
   Casting a date to timestamp involves multiplication and may overflow.
   DataFusion should report query error in such case, rather than panicking.
   
   ### To Reproduce
   
   ```shell
   cargo run --bin datafusion-cli -- --command "SELECT CAST(DATE '9999-12-31' 
As timestamp);"
   ```
   
   
   ```
   datafusion main$ cargo run --bin datafusion-cli -- --command "SELECT 
CAST(DATE '9999-12-31' As timestamp);"
       Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.18s
        Running `target/debug/datafusion-cli --command 'SELECT CAST(DATE 
'\''9999-12-31'\'' As timestamp);'`
   DataFusion CLI v50.0.0
   
   thread 'main' panicked at 
/Users/findepi/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/arrow-cast-56.0.0/src/cast/mod.rs:1881:58:
   attempt to multiply with overflow
   note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
   ```
   
   ### Expected behavior
   
   - query error informing about overflow
   
   ### Additional context
   
   _No response_


-- 
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: github-unsubscr...@datafusion.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to