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

Function array_dot

methods/array_ops/src/pg_gp/array_ops.c:615–629  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

613 */
614PG_FUNCTION_INFO_V1(array_dot);
615Datum
616array_dot(PG_FUNCTION_ARGS){
617 if (PG_ARGISNULL(0)) { PG_RETURN_NULL(); }
618 if (PG_ARGISNULL(1)) { PG_RETURN_NULL(); }
619
620 ArrayType *v1 = PG_GETARG_ARRAYTYPE_P(0);
621 ArrayType *v2 = PG_GETARG_ARRAYTYPE_P(1);
622
623 Datum res = General_2Array_to_Element(v1, v2, element_dot, noop_finalize);
624
625 PG_FREE_IF_COPY(v1, 0);
626 PG_FREE_IF_COPY(v2, 1);
627
628 return(res);
629}
630
631/*
632 * This function checks if each non-zero element in the right array equals to

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected