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

   ### Describe the bug
   
   Right now, I guess that we can't use `double quote` in `where` clause, like 
so:
   
   ```sql
   SELECT * FROM example where cpu = "host1"
   ```
   
   ### To Reproduce
   
   Execute the following commands on the terminal:
   
   ```
   echo "cpu, memory" > example.csv
   echo "host1, 2" >> example.csv
   ```
   
   And then execute `cargo run` for the following
   ```rust
   
   use datafusion::prelude::*;
   
   
   #[tokio::main]
   async fn main() -> datafusion::error::Result<()> {
     // register the table
     let ctx = SessionContext::new();
     ctx.register_csv("example", "example.csv", CsvReadOptions::new()).await?;
   
     // create a plan to run a SQL query
     let df = ctx.sql(r#"SELECT * FROM example where cpu = "host1""#).await?;
   
     // execute and print results
     df.show().await?;
     Ok(())
   }
   ```
   
   And then we get the following error:
   ```
   Error: SchemaError(FieldNotFound { field: Column { relation: None, name: 
"host1" }, valid_fields: [Column { relation: Some("example"), name: "cpu" }, 
Column { relation: Some("example"), name: " memory" }] })
   ```
   
   ### Expected behavior
   
   The expected behavior is to allow users to use `double quote` such as 
`single quote` in `where` clause, like so:
   
   ```sql
   SELECT * FROM example where cpu = "host1"
   ```
   
   ### Additional context
   
   _No response_


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