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

Method CorrInit

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

Source from the content-addressed store, hash-verified

538};
539
540void AggregateFunctions::CorrInit(FunctionContext* ctx, StringVal* dst) {
541 dst->is_null = false;
542 dst->len = sizeof(CorrState);
543 AllocBuffer(ctx, dst, dst->len);
544 if (UNLIKELY(dst->is_null)) {
545 DCHECK(!ctx->impl()->state()->GetQueryStatus().ok());
546 return;
547 }
548 *(reinterpret_cast<CorrState*>(dst->ptr)) = {};
549}
550
551static inline void CorrUpdateState(double x, double y, CorrState* state) {
552 double deltaX = x - state->xavg;

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