MCPcopy Create free account
hub / github.com/apache/madlib / array_sum_big

Function array_sum_big

methods/array_ops/src/pg_gp/array_ops.c:463–475  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

461 */
462PG_FUNCTION_INFO_V1(array_sum_big);
463Datum
464array_sum_big(PG_FUNCTION_ARGS){
465 if (PG_ARGISNULL(0)) { PG_RETURN_NULL(); }
466
467 ArrayType *v = PG_GETARG_ARRAYTYPE_P(0);
468
469 Datum res = General_Array_to_Element(v, Float8GetDatum(0), 0.0,
470 element_sum, noop_finalize);
471
472 PG_FREE_IF_COPY(v, 0);
473
474 return(res);
475}
476
477/*
478 * This function returns sum of the array elements.

Callers

nothing calls this directly

Calls 1

General_Array_to_ElementFunction · 0.85

Tested by

no test coverage detected