parquet::column::writer

Function update_stat

Source
fn update_stat<T: ParquetValueType, F>(
    descr: &ColumnDescriptor,
    val: &T,
    cur: &mut Option<T>,
    should_update: F,
)
where F: Fn(&T) -> bool,
Expand description

Perform a conditional update of cur, skipping any NaN values

If cur is None, sets cur to Some(val), otherwise calls should_update with the value of cur, and updates cur to Some(val) if it returns true