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

Function array_iter_next

src/include/utils/arrayaccess.h:80–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78}
79
80static inline Datum
81array_iter_next(array_iter *it, bool *isnull, int i,
82 int elmlen, bool elmbyval, char elmalign)
83{
84 Datum ret;
85
86 if (it->datumptr)
87 {
88 ret = it->datumptr[i];
89 *isnull = it->isnullptr ? it->isnullptr[i] : false;
90 }
91 else
92 {
93 if (it->bitmapptr && (*(it->bitmapptr) & it->bitmask) == 0)
94 {
95 *isnull = true;
96 ret = (Datum) 0;
97 }
98 else
99 {
100 *isnull = false;
101 ret = fetch_att(it->dataptr, elmbyval, elmlen);
102 it->dataptr = att_addlength_pointer(it->dataptr, elmlen,
103 it->dataptr);
104 it->dataptr = (char *) att_align_nominal(it->dataptr, elmalign);
105 }
106 it->bitmask <<= 1;
107 if (it->bitmask == 0x100)
108 {
109 if (it->bitmapptr)
110 it->bitmapptr++;
111 it->bitmask = 1;
112 }
113 }
114
115 return ret;
116}
117
118#endif /* ARRAYACCESS_H */

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