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

Function TestGetFnAttrs

be/src/exprs/expr-codegen-test.cc:40–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38};
39
40DecimalVal TestGetFnAttrs(
41 FunctionContext* ctx, const DecimalVal& arg0, BooleanVal& arg1, StringVal& arg2) {
42 FnAttr* state = reinterpret_cast<FnAttr*>(
43 ctx->GetFunctionState(FunctionContext::THREAD_LOCAL));
44 state->return_type_size =
45 ctx->impl()->GetConstFnAttr(FunctionContextImpl::RETURN_TYPE_SIZE);
46 state->arg0_type_size =
47 ctx->impl()->GetConstFnAttr(FunctionContextImpl::ARG_TYPE_SIZE, 0);
48 state->arg1_type_size =
49 ctx->impl()->GetConstFnAttr(FunctionContextImpl::ARG_TYPE_SIZE, 1);
50 state->arg2_type_size =
51 ctx->impl()->GetConstFnAttr(FunctionContextImpl::ARG_TYPE_SIZE, 2);
52 // This function and its callees call FunctionContextImpl::GetConstFnAttr();
53 return DecimalOperators::CastToDecimalVal(ctx, arg0);
54}
55
56// Don't compile the actual test to IR
57#ifndef IR_COMPILE

Callers 1

TEST_FFunction · 0.85

Calls 3

GetFunctionStateMethod · 0.80
GetConstFnAttrMethod · 0.80
implMethod · 0.80

Tested by

no test coverage detected