reduce

Function reduce 

Source
pub fn reduce(dataset: &DataSet, column: &str, op: ReduceOp) -> Option<Value>
Expand description

Reduce a column using a built-in ReduceOp.

  • Returns None if column does not exist in the schema.
  • For Count, always returns Some(Value::Int64(row_count)).
  • For numeric aggregates other than Count / CountDistinctNonNull, returns Some(Value::Null) if there are no non-null numeric values, or if the column type is not numeric (for those ops). CountDistinctNonNull supports DataType::Bool and DataType::Utf8 as well as numeric types.