Skip to content

aliasing a field renders it missing in the order by clause #669

Closed

Description

@jimexist

Describe the bug
A clear and concise description of what the bug is.

aliasing a field renders it missing in the order by clause. possible tightly coupled with #609

To Reproduce
Steps to reproduce the behavior:

select c1 x from test order by c1
Plan("No field with unqualified name 'c1'. Valid fields are 'x'.")

Expected behavior
A clear and concise description of what you expected to happen.

it shall work

Additional context
Add any other context about the problem here.

Activity

  1. houqp commented on Jul 4, 2021

    @houqp
    Member

    Yes, this is likely caused by the same root cause from #609. We currently cannot filter on non-projected columns.

  2. Jefffrey commented on Jan 24, 2023

    @Jefffrey
    Contributor

    Looks resolved as of latest master

    DataFusion CLI v16.0.0
    ❯ CREATE EXTERNAL TABLE test STORED AS CSV LOCATION 'test.csv';
    0 rows in set. Query took 0.010 seconds.
    ❯ select column_1 x from test order by column_1 desc;
    +---+
    | x |
    +---+
    | 4 |
    | 1 |
    +---+
    2 rows in set. Query took 0.014 seconds.
    ❯ select column_1 x from test order by x desc;
    +---+
    | x |
    +---+
    | 4 |
    | 1 |
    +---+
    2 rows in set. Query took 0.014 seconds.
    ❯
  3. alamb commented on Feb 2, 2023

    @alamb
    Contributor

    I believe I have a fix for another part of this as well #5067

  4. alamb commented on Feb 2, 2023

    @alamb
    Contributor

    Thanks @Jefffrey -- feel free to tag me on any ticket if you thing it should be closed

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions