pub fn cast<S: AsRef<str>>(
map: &[(S, DataType)],
data: &RecordBatch,
allow_cast_fail: bool,
) -> Result<RecordBatch>Expand description
Casts columns according to given (column name, target data type) pairs.
Returns error if casting a row fails and allow_cast_fail is set to false.
Writes null to output if casting a row fails and allow_cast_fail is set to true.