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

Method CovarInit

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

Source from the content-addressed store, hash-verified

775};
776
777void AggregateFunctions::CovarInit(FunctionContext* ctx, StringVal* dst) {
778 dst->is_null = false;
779 dst->len = sizeof(CovarState);
780 AllocBuffer(ctx, dst, dst->len);
781 if (UNLIKELY(dst->is_null)) {
782 DCHECK(!ctx->impl()->state()->GetQueryStatus().ok());
783 return;
784 }
785 *(reinterpret_cast<CovarState*>(dst->ptr)) = {};
786}
787
788static inline void CovarUpdateState(double x, double y, CovarState* state) {
789 ++state->count;

Callers

nothing calls this directly

Calls 5

AllocBufferFunction · 0.85
implMethod · 0.80
okMethod · 0.45
GetQueryStatusMethod · 0.45
stateMethod · 0.45

Tested by

no test coverage detected