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

Method eval_with_fast_window_agg

src/expr/src/relation/func.rs:2230–2264  ·  view source on GitHub ↗

Like `eval`, but it's given a [OneByOneAggr]. If `self` is a `WindowAggregate`, then the given [OneByOneAggr] will be used to evaluate the wrapped aggregate inside the `WindowAggregate`. If `self` is not a `WindowAggregate`, then it simply calls `eval`.

(
        &self,
        datums: I,
        temp_storage: &'a RowArena,
    )

Source from the content-addressed store, hash-verified

2228 /// the given [OneByOneAggr] will be used to evaluate the wrapped aggregate inside the
2229 /// `WindowAggregate`. If `self` is not a `WindowAggregate`, then it simply calls `eval`.
2230 pub fn eval_with_fast_window_agg<'a, I, W>(
2231 &self,
2232 datums: I,
2233 temp_storage: &'a RowArena,
2234 ) -> Datum<'a>
2235 where
2236 I: IntoIterator<Item = (Datum<'a>, Diff)>,
2237 W: OneByOneAggr,
2238 {
2239 match self {
2240 AggregateFunc::WindowAggregate {
2241 wrapped_aggregate,
2242 order_by,
2243 window_frame,
2244 } => window_aggr::<_, W>(
2245 expand_counts(datums),
2246 temp_storage,
2247 wrapped_aggregate,
2248 order_by,
2249 window_frame,
2250 ),
2251 AggregateFunc::FusedWindowAggregate {
2252 wrapped_aggregates,
2253 order_by,
2254 window_frame,
2255 } => fused_window_aggr::<_, W>(
2256 expand_counts(datums),
2257 temp_storage,
2258 wrapped_aggregates,
2259 order_by,
2260 window_frame,
2261 ),
2262 _ => self.eval(datums, temp_storage),
2263 }
2264 }
2265
2266 pub fn eval_with_unnest_list<'a, I, W>(
2267 &self,

Callers

nothing calls this directly

Calls 2

expand_countsFunction · 0.85
evalMethod · 0.45

Tested by

no test coverage detected