subwaycookiecrunch opened a new pull request, #19467:
URL: https://github.com/apache/datafusion/pull/19467

   ## Description
   This PR fixes a regression where setting 
`CsvReadOptions::schema_infer_max_records` to 0 caused columns to be inferred 
as `Null` instead of `Utf8`. This restores the behavior present in DataFusion 
v50.
   
   ## Changes
   - Modified `infer_schema_from_stream` in 
`datafusion/datasource-csv/src/file_format.rs` to explicitly handle the 
`records_to_read == 0` case, defaulting inferred types to `Utf8`.
   - Added a unit test `test_infer_schema_zero_limit` to verify the fix.
   
   ## Verification
   - Added a new unit test ensuring `Utf8` types are returned when the 
inference limit is set to zero.


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