You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
See the reproducer in datafusion-cli (compiled from the latest main, commit 0242767)
DataFusion CLI v42.0.0
> select 1 group by substr('' || false);
thread 'main' panicked at /Users/yongting/Desktop/code/my_datafusion/arrow-datafusion/datafusion/functions/src/unicode/substr.rs:113:74:
index out of bounds: the len is 1 but the index is 1
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
This can also be triggered if substr is in WHERE clause
> select 1 where substr('' || false);
thread 'main' panicked at /Users/yongting/Desktop/code/my_datafusion/arrow-datafusion/datafusion/functions/src/unicode/substr.rs:113:74:
index out of bounds: the len is 1 but the index is 1
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
To Reproduce
No response
Expected behavior
substr() function expression is provided with invalid argument(it's not allowed to take only 1 argument), so the query should return the planning error
Describe the bug
See the reproducer in datafusion-cli (compiled from the latest main, commit 0242767)
This can also be triggered if
substr
is in WHERE clauseTo Reproduce
No response
Expected behavior
substr()
function expression is provided with invalid argument(it's not allowed to take only 1 argument), so the query should return the planning errorAdditional context
Found by SQLancer #11030
The text was updated successfully, but these errors were encountered: