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

Function array_cum_prod

methods/array_ops/src/pg_gp/array_ops.c:917–926  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

915 */
916PG_FUNCTION_INFO_V1(array_cum_prod);
917Datum
918array_cum_prod(PG_FUNCTION_ARGS){
919 if (PG_ARGISNULL(0)) { PG_RETURN_NULL(); }
920
921 ArrayType *v = PG_GETARG_ARRAYTYPE_P(0);
922 ArrayType *res = General_Array_to_Cumulative_Array(v, Float8GetDatum(1.0), element_mult);
923
924 PG_FREE_IF_COPY(v, 0);
925 PG_RETURN_ARRAYTYPE_P(res);
926}
927
928/*
929 * This function removes elements with specified value from an array.

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected