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

Function array_mult

methods/array_ops/src/pg_gp/array_ops.c:706–720  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

704 */
705PG_FUNCTION_INFO_V1(array_mult);
706Datum
707array_mult(PG_FUNCTION_ARGS){
708 if (PG_ARGISNULL(0)) { PG_RETURN_NULL(); }
709 if (PG_ARGISNULL(1)) { PG_RETURN_NULL(); }
710
711 ArrayType *v1 = PG_GETARG_ARRAYTYPE_P(0);
712 ArrayType *v2 = PG_GETARG_ARRAYTYPE_P(1);
713
714 ArrayType *res = General_2Array_to_Array(v1, v2, element_mult);
715
716 PG_FREE_IF_COPY(v1, 0);
717 PG_FREE_IF_COPY(v2, 1);
718
719 PG_RETURN_ARRAYTYPE_P(res);
720}
721
722/*
723 * This function returns result of element-wise division of two arrays.

Callers

nothing calls this directly

Calls 1

General_2Array_to_ArrayFunction · 0.85

Tested by

no test coverage detected