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

Function scanArrowArrayStruct

src/common/arrow/arrow_array_scan.cpp:283–301  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

281}
282
283static void scanArrowArrayStruct(const ArrowSchema* schema, const ArrowArray* array,
284 ValueVector& outputVector, ArrowNullMaskTree* mask, uint64_t srcOffset, uint64_t dstOffset,
285 uint64_t count) {
286
287 mask->copyToValueVector(&outputVector, dstOffset, count);
288
289 rowIter(outputVector, count, [&](auto i) {
290 if (!mask->isNull(i)) {
291 outputVector.setValue<int64_t>(i + dstOffset,
292 i + dstOffset); // struct_entry_t doesn't work for some reason
293 }
294 });
295
296 for (int64_t j = 0; j < schema->n_children; j++) {
297 ArrowConverter::fromArrowArray(schema->children[j], array->children[j],
298 *StructVector::getFieldVector(&outputVector, j).get(), mask->getChild(j),
299 srcOffset + array->children[j]->offset, dstOffset, count);
300 }
301}
302
303static void scanArrowArrayDenseUnion(const ArrowSchema* schema, const ArrowArray* array,
304 ValueVector& outputVector, ArrowNullMaskTree* mask, uint64_t srcOffset, uint64_t dstOffset,

Callers 1

fromArrowArrayMethod · 0.85

Calls 5

rowIterFunction · 0.85
copyToValueVectorMethod · 0.80
isNullMethod · 0.45
getMethod · 0.45
getChildMethod · 0.45

Tested by

no test coverage detected