dbr opened a new issue, #2374:
URL: https://github.com/apache/arrow-datafusion/issues/2374

   **Describe the bug**
   With (I think) [the most up-to-date 
version](https://github.com/apache/arrow-datafusion/commit/744b2626081db95a254fc882820fc7812f95aa51)
 of the arrow2 branch, the idenfitiers in query seem to be made lower-case
   
   For example if I modify the `memtable` example by renaming the `bank_acount` 
field to `Bank_Account` then the query will fail,
   
   ```shell
   $ gd
   diff --git a/datafusion-examples/examples/memtable.rs 
b/datafusion-examples/examples/memtable.rs
   index 4c635205..16bd247d 100644
   --- a/datafusion-examples/examples/memtable.rs
   +++ b/datafusion-examples/examples/memtable.rs
   @@ -37,7 +37,7 @@ async fn main() -> Result<()> {
        // Register the in-memory table containing the data
        ctx.register_table("users", Arc::new(mem_table))?;
    
   -    let dataframe = ctx.sql("SELECT * FROM users;").await?;
   +    let dataframe = ctx.sql("SELECT Bank_Account FROM users;").await?;
    
        timeout(Duration::from_secs(10), async move {
            let result = dataframe.collect().await.unwrap();
   @@ -72,6 +72,6 @@ fn create_record_batch() -> Result<RecordBatch> {
    fn get_schema() -> SchemaRef {
        SchemaRef::new(Schema::new(vec![
            Field::new("id", DataType::UInt8, false),
   -        Field::new("bank_account", DataType::UInt64, true),
   +        Field::new("Bank_Account", DataType::UInt64, true),
        ]))
    }
   $ cargo run --example memtable
       Finished dev [unoptimized + debuginfo] target(s) in 0.35s
        Running `./target/debug/examples/memtable`
   Error: Plan("Invalid identifier '#bank_account' for schema fields:[users.id, 
users.Bank_Account], metadata:{}")
   ```
   
   Meaning, if the source table has any non-lowercase characters, the queries 
cannot work
   
   **Additional context**
   I'm using the arrow2 branch at this revision:
   
   
https://github.com/apache/arrow-datafusion/commit/744b2626081db95a254fc882820fc7812f95aa51


-- 
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