Bug in nth_value()
window function for NULL
input (SQLancer)
#12320
Labels
bug
Something isn't working
Describe the bug
There are two unexcepted behavior in
nth_value()
window functionWhen
NULL
literal is used in the second arg, it returnedExecution error: Expected an integer value
The expected behavior is to evaluate all rows to
NULL
, becauseNULL
should be treated as a missing integer valueWhen second arg is
col*NULL
, it returned another unexpected internal errorMore details can be found in the reproducer in datafusion-cli (Compiled from latest main, commit hash 6bbad7e, with
cargo run
)Expected behavior in DuckDB (output in postgres is the same)
To Reproduce
No response
Expected behavior
No response
Additional context
Found by SQLancer #11030
The text was updated successfully, but these errors were encountered: