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

Function TruncSumSerialize

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

Source from the content-addressed store, hash-verified

285}
286
287IMPALA_UDF_EXPORT
288const DoubleVal TruncSumSerialize(FunctionContext* context, const DoubleVal& total) {
289 // Arg types should be logical input types of UDA.
290 assert(context->GetNumArgs() == 1);
291 assert(context->GetArgType(0)->type == FunctionContext::TYPE_DOUBLE);
292 assert(context->GetArgType(-1) == nullptr);
293 assert(context->GetArgType(1) == nullptr);
294 assert(context->GetIntermediateType().type == FunctionContext::TYPE_DOUBLE);
295 assert(context->GetReturnType().type == FunctionContext::TYPE_BIGINT);
296 return total;
297}
298
299IMPALA_UDF_EXPORT
300BigIntVal TruncSumFinalize(FunctionContext* context, const DoubleVal& total) {

Callers

nothing calls this directly

Calls 2

GetNumArgsMethod · 0.80
GetArgTypeMethod · 0.80

Tested by

no test coverage detected