alamb opened a new issue #1432:
URL: https://github.com/apache/arrow-datafusion/issues/1432


   **Describe the bug**
   Field names containing period such as `f.c1` cannot be named in SQL query
   
   **To Reproduce**
   Adapted from https://github.com/influxdata/influxdb_iox/issues/3351 from 
@jacobmarble
   
   
   ```shell
   echo "1" > /tmp/foo.csv
   cargo run --bin datafusion-cli
   ```
   
   
   ```sql
   ❯ create external table foo("f.c1" int) stored as CSV location 
'/tmp/foo.csv';
   0 rows in set. Query took 0.001 seconds.
   ❯ select * from foo;
   +------+
   | f.c1 |
   +------+
   | 1    |
   +------+
   1 row in set. Query took 0.009 seconds.
   ❯ select f.c1 from foo;
   Plan("No field named 'f.c1'. Valid fields are 'foo.f.c1'.")
   ❯ select "f.c1" from foo;
   Plan("No field named 'f.c1'. Valid fields are 'foo.f.c1'.")
   ❯ select "foo.f.c1" from foo;
   Plan("Invalid identifier '#foo.f.c1' for schema foo.f.c1")
   ```
   
   
   **Expected behavior**
   
   I expect the query `select "f.c1" from foo;` to return `1` (note that "f.c1" 
is quoted)
   
   **Additional context**
   Found during testing of IOx 
https://github.com/influxdata/influxdb_iox/issues/3351


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to