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
Describe the bug
A malformed query generates a panic rather than an error
To Reproduce
echo "true" > /tmp/foo.csv
cargo run -p datafusion-cli --no-default-features
Then run select count(distinct) from foo; via sql:
> CREATE EXTERNAL TABLE foo(bar boolean)
STORED AS CSV
LOCATION '/tmp/foo.csv';
0 rows in set. Query took 0 seconds.
> select count(distinct) from foo;
thread 'main' panicked at 'index out of bounds: the len is 0 but the index is 0', datafusion/src/physical_plan/aggregates.rs:116:15
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Expected behavior
I expect an error about "no column specified for count distinct" rather than a panic
The text was updated successfully, but these errors were encountered:
Thanks @jgoday ! Perhaps you can make the error a little more specific -- like "no arguments passed to aggregate {}" or something. But the location looks reasonable
Describe the bug
A malformed query generates a panic rather than an error
To Reproduce
Then run
select count(distinct) from foo;
via sql:Expected behavior
I expect an error about "no column specified for count distinct" rather than a panic
The text was updated successfully, but these errors were encountered: