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

Function construct_empty_expanded_array

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

* construct_empty_expanded_array: make an empty expanded array * given only type information. (metacache can be NULL if not needed.) */

Source from the content-addressed store, hash-verified

3554 * given only type information. (metacache can be NULL if not needed.)
3555 */
3556ExpandedArrayHeader *
3557construct_empty_expanded_array(Oid element_type,
3558 MemoryContext parentcontext,
3559 ArrayMetaState *metacache)
3560{
3561 ArrayType *array = construct_empty_array(element_type);
3562 Datum d;
3563
3564 d = expand_array(PointerGetDatum(array), parentcontext, metacache);
3565 pfree(array);
3566 return (ExpandedArrayHeader *) DatumGetEOHP(d);
3567}
3568
3569/*
3570 * deconstruct_array --- simple method for extracting data from an array

Callers 1

Calls 4

construct_empty_arrayFunction · 0.85
expand_arrayFunction · 0.85
DatumGetEOHPFunction · 0.85
pfreeFunction · 0.50

Tested by

no test coverage detected