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

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

Closed
jimexist opened this issue Jul 4, 2021 · 4 comments
Closed

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

jimexist opened this issue Jul 4, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@jimexist
Copy link
Member

jimexist commented Jul 4, 2021

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.

@jimexist jimexist added the bug Something isn't working label Jul 4, 2021
@houqp
Copy link
Member

houqp commented Jul 4, 2021

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

@Jefffrey
Copy link
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.
❯

@alamb
Copy link
Contributor

alamb commented Feb 2, 2023

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

@alamb
Copy link
Contributor

alamb commented Feb 2, 2023

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

@alamb alamb closed this as completed Feb 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants