Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid column reference in window function order by causes panic #9166

Closed
helgikrs opened this issue Feb 8, 2024 · 2 comments · Fixed by #9202
Closed

Invalid column reference in window function order by causes panic #9166

helgikrs opened this issue Feb 8, 2024 · 2 comments · Fixed by #9202
Assignees
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@helgikrs
Copy link

helgikrs commented Feb 8, 2024

Describe the bug

This unwrap causes a panic when the referenced column doesn't exist in the schema.

To Reproduce

In 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

@helgikrs helgikrs added the bug Something isn't working label Feb 8, 2024
@viirya viirya added the good first issue Good for newcomers label Feb 8, 2024
@PhVHoang
Copy link
Contributor

PhVHoang commented Feb 8, 2024

I'm new to the project but I would love to take this one as a chance to learn more about it if you don't mind. Thank you.

@PhVHoang
Copy link
Contributor

take

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants