| 261 | } |
| 262 | |
| 263 | IMPALA_UDF_EXPORT |
| 264 | void 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 | |
| 275 | IMPALA_UDF_EXPORT |
| 276 | void TruncSumMerge(FunctionContext* context, const DoubleVal& src, DoubleVal* dst) { |
nothing calls this directly
no test coverage detected