| 212 | |
| 213 | template<typename offsetsT> |
| 214 | static void scanArrowArrayList(const ArrowSchema* schema, const ArrowArray* array, |
| 215 | ValueVector& outputVector, ArrowNullMaskTree* mask, uint64_t srcOffset, uint64_t dstOffset, |
| 216 | uint64_t count) { |
| 217 | auto offsets = ((const offsetsT*)array->buffers[1]) + srcOffset; |
| 218 | uint64_t auxDstPosition = function::NumericLimits<uint64_t>::maximum(); |
| 219 | |
| 220 | mask->copyToValueVector(&outputVector, dstOffset, count); |
| 221 | |
| 222 | rowIter(outputVector, count, [&](auto i) { |
| 223 | auto curOffset = offsets[i], nextOffset = offsets[i + 1]; |
| 224 | // don't check for validity, since we still need to update the offsets |
| 225 | auto newEntry = ListVector::addList(&outputVector, nextOffset - curOffset); |
| 226 | outputVector.setValue<list_entry_t>(i + dstOffset, newEntry); |
| 227 | if (auxDstPosition == function::NumericLimits<uint64_t>::maximum()) { |
| 228 | auxDstPosition = newEntry.offset; |
| 229 | } |
| 230 | }); |
| 231 | |
| 232 | if (auxDstPosition == function::NumericLimits<uint64_t>::maximum()) { |
| 233 | auxDstPosition = 0; |
| 234 | } |
| 235 | |
| 236 | ValueVector* auxiliaryBuffer = ListVector::getDataVector(&outputVector); |
| 237 | ArrowConverter::fromArrowArray(schema->children[0], array->children[0], *auxiliaryBuffer, |
| 238 | mask->getChild(0), offsets[0] + array->children[0]->offset, auxDstPosition, |
| 239 | offsets[count] - offsets[0]); |
| 240 | } |
| 241 | |
| 242 | template<typename offsetsT> |
| 243 | static void scanArrowArrayListView(const ArrowSchema* schema, const ArrowArray* array, |
nothing calls this directly
no test coverage detected