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

Function array_scalar_mult

methods/array_ops/src/pg_gp/array_ops.c:864–877  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

862 */
863PG_FUNCTION_INFO_V1(array_scalar_mult);
864Datum
865array_scalar_mult(PG_FUNCTION_ARGS){
866 if (PG_ARGISNULL(0)) { PG_RETURN_NULL(); }
867 if (PG_ARGISNULL(1)) { PG_RETURN_NULL(); }
868
869 ArrayType *v1 = PG_GETARG_ARRAYTYPE_P(0);
870 Datum v2 = PG_GETARG_DATUM(1);
871
872 ArrayType *res = General_Array_to_Array(v1, v2, element_mult);
873
874 PG_FREE_IF_COPY(v1, 0);
875
876 PG_RETURN_ARRAYTYPE_P(res);
877}
878
879/*
880 * This function addes the specified value to each element.

Callers

nothing calls this directly

Calls 1

General_Array_to_ArrayFunction · 0.85

Tested by

no test coverage detected