MCPcopy Create free account
hub / github.com/apache/cloudberry / create_array_envelope

Function create_array_envelope

src/backend/utils/adt/arrayfuncs.c:5949–5964  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5947}
5948
5949static ArrayType *
5950create_array_envelope(int ndims, int *dimv, int *lbsv, int nbytes,
5951 Oid elmtype, int dataoffset)
5952{
5953 ArrayType *result;
5954
5955 result = (ArrayType *) palloc0(nbytes);
5956 SET_VARSIZE(result, nbytes);
5957 result->ndim = ndims;
5958 result->dataoffset = dataoffset;
5959 result->elemtype = elmtype;
5960 memcpy(ARR_DIMS(result), dimv, ndims * sizeof(int));
5961 memcpy(ARR_LBOUND(result), lbsv, ndims * sizeof(int));
5962
5963 return result;
5964}
5965
5966static ArrayType *
5967array_fill_internal(ArrayType *dims, ArrayType *lbs,

Callers 1

array_fill_internalFunction · 0.85

Calls 1

palloc0Function · 0.50

Tested by

no test coverage detected