-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
SELECT on column with uppercase column name fails with FieldNotFound error #2978
Comments
I think you may need to use select "UPPERCASE_NAME" from t; |
Thanks @alamb ! That does work and it looks like this behaviour is consistent with postgres as well. I'm closing this issue. |
Yeah, it is part of the SQL standard which is somewhat archaic 🤷 |
I have this problem as well. It's works to use this "fileld_name" as a quoted identifier. Is there a plan to support backtick (`) for "Quoted identifier"? |
I don't know of any plans @ray-andrew -- I think the backtick is a mysql syntax where the postgres dialect, that DataFusion follows, uses Here is mysql: mysql> select * from bar;
+------+
| x |
+------+
| 1 |
| NULL |
+------+
2 rows in set (0.01 sec)
mysql> select `x` from bar;
+------+
| x |
+------+
| 1 |
| NULL |
+------+
2 rows in set (0.00 sec)
mysql> select "x" from bar;
+---+
| x |
+---+
| x |
| x |
+---+
2 rows in set (0.00 sec) |
Describe the bug
select UPPERCASE_NAME from t;
fails with a FieldNotFound SchemaError like this:The name in the FieldNotFound error is the lower-case version of the selected column name.
To Reproduce
Using datafusion-cli on the attached test parquet file:
Expected behavior
Expected that SELECTs on columns with uppercase names would behave the same as SELECTs on columns with lowercase names.
Additional context
Test parquet to reproduce the issue:
test.parquet.zip
The text was updated successfully, but these errors were encountered: