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

Function array_set_isnull

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

* Set a specific array element's null-bitmap entry * * nullbitmap: pointer to array's null bitmap (mustn't be NULL) * offset: 0-based linear element number of array element * isNull: null status to set */

Source from the content-addressed store, hash-verified

4685 * isNull: null status to set
4686 */
4687static void
4688array_set_isnull(bits8 *nullbitmap, int offset, bool isNull)
4689{
4690 int bitmask;
4691
4692 nullbitmap += offset / 8;
4693 bitmask = 1 << (offset % 8);
4694 if (isNull)
4695 *nullbitmap &= ~bitmask;
4696 else
4697 *nullbitmap |= bitmask;
4698}
4699
4700/*
4701 * Fetch array element at pointer, converted correctly to a Datum

Callers 1

array_set_elementFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected