dqkqd commented on PR #17796:
URL: https://github.com/apache/datafusion/pull/17796#issuecomment-3346731891

   I've just realized that returning `Utf8` for columns with only nulls (or 
empty files) causes schema mismatch when reading folders containing those files 
along with normal files. 
   So maybe returning `DataType::Null` is a better choice. I'll revert the code 
and update testcase.
   
   ```
   > cat test_data/a.csv
   c1,c2,c3
   
   > cat test_data/b.csv
   c1,c2,c3
   1,1,1
   2,2,2
   ```
   
   This fails in `main`.
   ```
   DataFusion CLI v50.0.0
   > select * from 'test_data';
   Arrow error: Schema error: Fail to merge schema field 'c1' because the from 
data_type = Utf8 does not equal Int64
   ```


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