MCPcopy Create free account
hub / github.com/apache/impala / FirstValUpdate

Method FirstValUpdate

be/src/exprs/aggregate-functions-ir.cc:3601–3609  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3599
3600template <typename T>
3601void AggregateFunctions::FirstValUpdate(FunctionContext* ctx, const T& src, T* dst) {
3602 // The first call to FirstValUpdate sets the value of dst.
3603 if (ctx->impl()->num_updates() > 1) return;
3604 // num_updates is incremented before calling Update(), so it should never be 0.
3605 // Remove() should never be called for FIRST_VALUE.
3606 DCHECK_GT(ctx->impl()->num_updates(), 0);
3607 DCHECK_EQ(ctx->impl()->num_removes(), 0);
3608 *dst = src;
3609}
3610
3611template <>
3612void AggregateFunctions::FirstValUpdate(FunctionContext* ctx, const StringVal& src,

Callers

nothing calls this directly

Calls 4

CopyStringValFunction · 0.85
num_updatesMethod · 0.80
implMethod · 0.80
num_removesMethod · 0.80

Tested by

no test coverage detected