Skip to content

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

Closed

Description

@helgikrs

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

Activity

  1. PhVHoang commented on Feb 8, 2024

    @PhVHoang
    Contributor

    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.

  2. PhVHoang commented on Feb 12, 2024

    @PhVHoang
    Contributor

    take

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinggood first issueGood for newcomers

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions