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

Function TruncSumUpdate

be/src/testutil/test-udas.cc:263–273  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

261}
262
263IMPALA_UDF_EXPORT
264void TruncSumUpdate(FunctionContext* context, const DoubleVal& val, DoubleVal* total) {
265 // Arg types should be logical input types of UDA.
266 assert(context->GetNumArgs() == 1);
267 assert(context->GetArgType(0)->type == FunctionContext::TYPE_DOUBLE);
268 assert(context->GetArgType(-1) == nullptr);
269 assert(context->GetArgType(1) == nullptr);
270 assert(context->GetIntermediateType().type == FunctionContext::TYPE_DOUBLE);
271 assert(context->GetReturnType().type == FunctionContext::TYPE_BIGINT);
272 total->val += val.val;
273}
274
275IMPALA_UDF_EXPORT
276void TruncSumMerge(FunctionContext* context, const DoubleVal& src, DoubleVal* dst) {

Callers

nothing calls this directly

Calls 2

GetNumArgsMethod · 0.80
GetArgTypeMethod · 0.80

Tested by

no test coverage detected