-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
select UPPERCASE_NAME from t; fails with a FieldNotFound SchemaError like this:
SchemaError(FieldNotFound { qualifier: None, name: "uppercase_name", valid_fields: Some(["t.UPPERCASE_NAME"]) })
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:
❯ CREATE EXTERNAL TABLE t STORED AS PARQUET LOCATION 'test.parquet';
0 rows in set. Query took 0.004 seconds.
❯ select * from t;
+----------------+--------------------+
| UPPERCASE_NAME | not_uppercase_name |
+----------------+--------------------+
| 3 | 3 |
| 2 | 2 |
| 1 | 1 |
| 0 | 0 |
+----------------+--------------------+
4 rows in set. Query took 0.008 seconds.
❯ select not_uppercase_name from t;
+--------------------+
| not_uppercase_name |
+--------------------+
| 3 |
| 2 |
| 1 |
| 0 |
+--------------------+
4 rows in set. Query took 0.007 seconds.
❯ select UPPERCASE_NAME from t;
SchemaError(FieldNotFound { qualifier: None, name: "uppercase_name", valid_fields: Some(["t.UPPERCASE_NAME", "t.not_uppercase_name"]) })
❯
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
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working