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

Function scanArrowArrayDictionaryEncoded

src/common/arrow/arrow_array_scan.cpp:357–373  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

355
356template<typename offsetsT>
357static void scanArrowArrayDictionaryEncoded(const ArrowSchema* schema, const ArrowArray* array,
358 ValueVector& outputVector, ArrowNullMaskTree* mask, uint64_t srcOffset, uint64_t dstOffset,
359 uint64_t count) {
360
361 auto values = ((const offsetsT*)array->buffers[1]) + srcOffset;
362
363 mask->copyToValueVector(&outputVector, dstOffset, count);
364
365 rowIter(outputVector, count, [&](auto i) {
366 if (!mask->isNull(i)) {
367 auto dictOffseted = mask->getDictionary()->offsetBy(values[i]);
368 ArrowConverter::fromArrowArray(schema->dictionary, array->dictionary, outputVector,
369 &dictOffseted, values[i] + array->dictionary->offset, i + dstOffset,
370 1); // possibly inefficient?
371 }
372 });
373}
374
375static void scanArrowArrayRunEndEncoded(const ArrowSchema* schema, const ArrowArray* array,
376 ValueVector& outputVector, ArrowNullMaskTree* mask, uint64_t srcOffset, uint64_t dstOffset,

Callers

nothing calls this directly

Calls 5

rowIterFunction · 0.85
copyToValueVectorMethod · 0.80
offsetByMethod · 0.80
getDictionaryMethod · 0.80
isNullMethod · 0.45

Tested by

no test coverage detected