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

Function resizeUnionVector

src/common/arrow/arrow_row_batch.cpp:162–180  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

160}
161
162static void resizeUnionVector(ArrowVector* vector, const LogicalType& type, int64_t capacity,
163 bool fallbackExtensionTypes) {
164 if (vector->capacity < capacity) {
165 while (vector->capacity < capacity) {
166 if (vector->capacity == 0) {
167 vector->capacity = 1;
168 } else {
169 vector->capacity *= 2;
170 }
171 }
172 resizeMainBuffer(vector, type, vector->capacity, fallbackExtensionTypes);
173 }
174 resizeUnionOverflow(vector, vector->capacity);
175 std::vector<LogicalType> childTypes;
176 for (auto i = 0u; i < UnionType::getNumFields(type); i++) {
177 childTypes.push_back(UnionType::getFieldType(type, i).copy());
178 }
179 resizeChildVectors(vector, childTypes, vector->capacity, fallbackExtensionTypes);
180}
181
182static void resizeInternalIDVector(ArrowVector* vector, const LogicalType& type, int64_t capacity,
183 bool fallbackExtensionTypes) {

Callers 1

resizeVectorFunction · 0.85

Calls 5

resizeMainBufferFunction · 0.85
resizeUnionOverflowFunction · 0.85
resizeChildVectorsFunction · 0.85
push_backMethod · 0.45
copyMethod · 0.45

Tested by

no test coverage detected