| 285 | } |
| 286 | |
| 287 | IMPALA_UDF_EXPORT |
| 288 | const 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 | |
| 299 | IMPALA_UDF_EXPORT |
| 300 | BigIntVal TruncSumFinalize(FunctionContext* context, const DoubleVal& total) { |
nothing calls this directly
no test coverage detected