MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / default

Method default

src/expr/src/relation/func.rs:2337–2345  ·  view source on GitHub ↗

Returns the output of the aggregation function when applied on an empty input relation.

(&self)

Source from the content-addressed store, hash-verified

2335 /// Returns the output of the aggregation function when applied on an empty
2336 /// input relation.
2337 pub fn default(&self) -> Datum<'static> {
2338 match self {
2339 AggregateFunc::Count => Datum::Int64(0),
2340 AggregateFunc::Any => Datum::False,
2341 AggregateFunc::All => Datum::True,
2342 AggregateFunc::Dummy => Datum::Dummy,
2343 _ => Datum::Null,
2344 }
2345 }
2346
2347 /// Returns a datum whose inclusion in the aggregation will not change its
2348 /// result.

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected