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

Function ValidateCharIntermediateFunctionContext

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

Defines AggCharIntermediate(INT) returns INT with CHAR(10) intermediate. The function computes the sum of the input.

Source from the content-addressed store, hash-verified

369// Defines AggCharIntermediate(INT) returns INT with CHAR(10) intermediate.
370// The function computes the sum of the input.
371static void ValidateCharIntermediateFunctionContext(const FunctionContext* context) {
372 assert(context->GetNumArgs() == 1);
373 assert(context->GetArgType(0)->type == FunctionContext::TYPE_INT);
374 assert(context->GetIntermediateType().type == FunctionContext::TYPE_FIXED_BUFFER);
375 assert(context->GetIntermediateType().len == 10);
376 assert(context->GetReturnType().type == FunctionContext::TYPE_INT);
377}
378IMPALA_UDF_EXPORT
379void AggCharIntermediateInit(FunctionContext* context, StringVal* dst) {
380 ValidateCharIntermediateFunctionContext(context);

Callers 5

AggCharIntermediateInitFunction · 0.85
AggCharIntermediateMergeFunction · 0.85

Calls 2

GetNumArgsMethod · 0.80
GetArgTypeMethod · 0.80

Tested by

no test coverage detected