pub fn infer<R>(
    reader: &mut R,
    number_of_rows: Option<usize>
) -> Result<DataType, ArrowError> where
    R: BufRead
This is supported on crate feature io_json only.
Expand description

Infers the DataType from an NDJSON file, optionally only using number_of_rows rows.

Implementantion

This implementation reads the file line by line and infers the type of each line. It performs both O(N) IO and CPU-bounded operations where N is the number of rows.