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

Function array_iter_setup

src/include/utils/arrayaccess.h:48–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46
47
48static inline void
49array_iter_setup(array_iter *it, AnyArrayType *a)
50{
51 if (VARATT_IS_EXPANDED_HEADER(a))
52 {
53 if (a->xpn.dvalues)
54 {
55 it->datumptr = a->xpn.dvalues;
56 it->isnullptr = a->xpn.dnulls;
57 /* we must fill all fields to prevent compiler warnings */
58 it->dataptr = NULL;
59 it->bitmapptr = NULL;
60 }
61 else
62 {
63 /* Work with flat array embedded in the expanded datum */
64 it->datumptr = NULL;
65 it->isnullptr = NULL;
66 it->dataptr = ARR_DATA_PTR(a->xpn.fvalue);
67 it->bitmapptr = ARR_NULLBITMAP(a->xpn.fvalue);
68 }
69 }
70 else
71 {
72 it->datumptr = NULL;
73 it->isnullptr = NULL;
74 it->dataptr = ARR_DATA_PTR((ArrayType *) a);
75 it->bitmapptr = ARR_NULLBITMAP((ArrayType *) a);
76 }
77 it->bitmask = 1;
78}
79
80static inline Datum
81array_iter_next(array_iter *it, bool *isnull, int i,

Callers 9

array_outFunction · 0.85
array_sendFunction · 0.85
array_mapFunction · 0.85
array_eqFunction · 0.85
array_cmpFunction · 0.85
hash_arrayFunction · 0.85
hash_array_extendedFunction · 0.85
array_contain_compareFunction · 0.85
array_unnestFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected