alamb opened a new issue #496:
URL: https://github.com/apache/arrow-datafusion/issues/496


   **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 this 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


-- 
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to