Skip to main content

parse_number_columns

Function parse_number_columns 

Source
pub fn parse_number_columns(
    stream: SendableRecordBatchStream,
    numbers: Vec<Option<TextNumber>>,
    empty_as_null: bool,
) -> SendableRecordBatchStream
Expand description

Parses the string columns of stream that have a type in numbers into columns of that type. numbers has one entry for each column of the stream.

With empty_as_null an empty string is read as NULL, which is what an empty csv field is for a number. Without it an empty string is an error, like any other text that is not a number.