| 1432 | } |
| 1433 | |
| 1434 | VectorPtr VectorFuzzer::wrapInLazyVector(VectorPtr baseVector) { |
| 1435 | if (hasNestedDictionaryLayers(baseVector)) { |
| 1436 | auto indices = baseVector->wrapInfo(); |
| 1437 | auto values = baseVector->valueVector(); |
| 1438 | auto nulls = baseVector->nulls(); |
| 1439 | |
| 1440 | auto copiedNulls = AlignedBuffer::copy(baseVector->pool(), nulls); |
| 1441 | |
| 1442 | return BaseVector::wrapInDictionary( |
| 1443 | copiedNulls, indices, baseVector->size(), wrapInLazyVector(values)); |
| 1444 | } |
| 1445 | return std::make_shared<LazyVector>( |
| 1446 | baseVector->pool(), |
| 1447 | baseVector->type(), |
| 1448 | baseVector->size(), |
| 1449 | std::make_unique<VectorLoaderWrap>(baseVector)); |
| 1450 | } |
| 1451 | |
| 1452 | RowVectorPtr VectorFuzzer::fuzzRowChildrenToLazy(RowVectorPtr rowVector) { |
| 1453 | std::vector<VectorPtr> children; |