alamb opened a new issue, #11936:
URL: https://github.com/apache/datafusion/issues/11936

   ### Is your feature request related to a problem or challenge?
   
   As @jgranduel  notes in  https://github.com/apache/datafusion/issues/11848
   
   I think most people would expect when reading this data as a csv file, we 
would get two columns `a` and `b`
   
   ```csv
   a,b
   1,2
   ```
   
   However, datafusion currently treats the CSV file as "without header" by 
default resulting in 
   
   ```
   > datafusion-cli.exe
   DataFusion CLI v40.0.0
   > select * from './data_dir/';
   +----------+----------+
   | column_1 | column_2 |
   +----------+----------+
   | a        | b        |
   | 1        | 2        |
   | a        | b        |
   | 3        | 4        |
   +----------+----------+
   4 row(s) fetched.
   ```
   
   ### Describe the solution you'd like
   
   I propose removing this "rough edge" and changing the datafusion default 
behavior to be what I think most people would expect
   
   ```sql
   +---+---+
   | a | b |
   +---+---+
   | 1 | 2 |
   +---+---+
   ```
   
   ### Describe alternatives you've considered
   
   I think we should change the default vale of `datafusion.catalog.has_header` 
from `false` to `true`
   
   
https://github.com/apache/datafusion/blob/79fa6f9098be9a6e5b269cd3642694765b230ff1/datafusion/common/src/config.rs#L184-L186
   
   
   
   ### 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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to