helgikrs opened a new issue, #9166: URL: https://github.com/apache/arrow-datafusion/issues/9166
### Describe the bug [This unwrap](https://github.com/apache/arrow-datafusion/blob/main/datafusion/sql/src/expr/function.rs#L156) causes a panic when the referenced column doesn't exist in the schema. ### To Reproduce In datafusion-cli v35.0.0 ```DataFusion CLI v35.0.0 ❯ select count() over (order by a); thread 'main' panicked at datafusion-sql-35.0.0/src/expr/function.rs:112:63: called `Result::unwrap()` on an `Err` value: SchemaError(FieldNotFound { field: Column { relation: None, name: "a" }, valid_fields: [] }, Some("")) note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace ``` ### Expected behavior A graceful error instead of a panic. ### Additional context _No response_ -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
