MCPcopy Create free account
hub / github.com/LadybugDB/ladybug / ArrowNullMaskTree

Method ArrowNullMaskTree

src/common/arrow/arrow_null_mask_tree.cpp:79–219  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77}
78
79ArrowNullMaskTree::ArrowNullMaskTree(const ArrowSchema* schema, const ArrowArray* array,
80 uint64_t srcOffset, uint64_t count, const NullMask* parentBitmap)
81 : offset{0}, mask{std::make_shared<common::NullMask>(count)},
82 children(std::make_shared<std::vector<ArrowNullMaskTree>>()) {
83 if (schema->dictionary != nullptr) {
84 copyFromBuffer(array->buffers[0], srcOffset, count);
85 applyParentBitmap(parentBitmap);
86 dictionary = std::make_shared<ArrowNullMaskTree>(schema->dictionary, array->dictionary,
87 array->dictionary->offset, array->dictionary->length);
88 return;
89 }
90 const char* arrowType = schema->format;
91 std::vector<common::StructField> structFields;
92 switch (arrowType[0]) {
93 case 'n':
94 mask->setAllNull();
95 break;
96 case 'b':
97 case 'c':
98 case 'C':
99 case 's':
100 case 'S':
101 case 'i':
102 case 'I':
103 case 'l':
104 case 'L':
105 case 'd':
106 case 'f':
107 case 'g':
108 copyFromBuffer(array->buffers[0], srcOffset, count);
109 break;
110 case 'z':
111 case 'Z':
112 case 'u':
113 case 'U':
114 case 'v':
115 case 'w':
116 case 't':
117 copyFromBuffer(array->buffers[0], srcOffset, count);
118 applyParentBitmap(parentBitmap);
119 break;
120 case '+':
121 switch (arrowType[1]) {
122 case 'l':
123 copyFromBuffer(array->buffers[0], srcOffset, count);
124 applyParentBitmap(parentBitmap);
125 scanListPushDown<int32_t>(schema, array, srcOffset, count);
126 break;
127 case 'L':
128 copyFromBuffer(array->buffers[0], srcOffset, count);
129 applyParentBitmap(parentBitmap);
130 scanListPushDown<int64_t>(schema, array, srcOffset, count);
131 break;
132 case 'w':
133 copyFromBuffer(array->buffers[0], srcOffset, count);
134 applyParentBitmap(parentBitmap);
135 scanArrayPushDown(schema, array, srcOffset, count);
136 break;

Callers

nothing calls this directly

Calls 6

copyFromNullBitsMethod · 0.80
ArrowNullMaskTreeClass · 0.50
push_backMethod · 0.45
setNullMethod · 0.45
isNullMethod · 0.45
operator[]Method · 0.45

Tested by

no test coverage detected