2010YOUY01 opened a new issue, #12129: URL: https://github.com/apache/datafusion/issues/12129
### Describe the bug It's expected to return an error instead of crash for bad input See reproducer in datafusion-cli (Run under latest main, compiled using `cargo run`, commit 00b3f3be5) ``` DataFusion CLI v41.0.0 > select substring('foo', 9223372036854775807 + 1, 1); thread 'main' panicked at /Users/yongting/Desktop/code/my_datafusion/arrow-datafusion/datafusion/functions/src/unicode/substr.rs:154:47: attempt to subtract with overflow note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace ``` ### To Reproduce _No response_ ### Expected behavior _No response_ ### Additional context Found by SQLancer https://github.com/apache/datafusion/issues/11030 -- 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