Lordworms commented on issue #5729:
URL: https://github.com/apache/arrow-rs/issues/5729#issuecomment-2148473682

   Seems like it is not a bug here, we could directly pass the quote to Format 
struct and get the correct answer
   suppose we have a csv file like 
   <img width="296" alt="image" 
src="https://github.com/apache/arrow-rs/assets/48054792/639422c2-53bd-4f37-b5b2-07248b93f7b9";>
   and writing a test like 
   ```Rust
   fn test_with_quote() {
           let mut file =
               
File::open("/Users/yxiang1/work/arrow-rs/arrow-csv/test/data/quote.csv").unwrap();
           let (schema, _) = Format::default().infer_schema(&mut file, 
None).unwrap();
   
           println!("did not pass quote schema is {:?}", schema);
   
           let mut file =
               File::open("test/data/quote.csv").unwrap();
   
           let (schema, _) = Format::default()
               .with_quote(b'\'')
               .infer_schema(&mut file, None)
               .unwrap();
           println!("after pass schema is {:?}", schema);
       }
   ```
   we could pass the single quote to Format and get different results like
   <img width="1121" alt="image" 
src="https://github.com/apache/arrow-rs/assets/48054792/57adac26-a1d5-49c8-b531-49556da1e782";>
   


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