Function deltalake::arrow::csv::reader::infer_file_schema

source ·
pub fn infer_file_schema<R>(
    reader: R,
    delimiter: u8,
    max_read_records: Option<usize>,
    has_header: bool
) -> Result<(Schema, usize), ArrowError>
where R: Read + Seek,
👎Deprecated: Use Format::infer_schema
Expand description

Infer the schema of a CSV file by reading through the first n records of the file, with max_read_records controlling the maximum number of records to read.

If max_read_records is not set, the whole file is read to infer its schema.

Return inferred schema and number of records used for inference. This function does not change reader cursor offset.

The inferred schema will always have each field set as nullable.