MCPcopy Create free account
hub / github.com/bytedance/bolt / wrapInLazyVector

Method wrapInLazyVector

bolt/vector/fuzzer/VectorFuzzer.cpp:1434–1450  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1432}
1433
1434VectorPtr 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
1452RowVectorPtr VectorFuzzer::fuzzRowChildrenToLazy(RowVectorPtr rowVector) {
1453 std::vector<VectorPtr> children;

Callers 3

TEST_FFunction · 0.80
TEST_FFunction · 0.80
TEST_PFunction · 0.80

Calls 8

wrapInDictionaryFunction · 0.85
copyFunction · 0.50
wrapInfoMethod · 0.45
nullsMethod · 0.45
poolMethod · 0.45
sizeMethod · 0.45
typeMethod · 0.45

Tested by 3

TEST_FFunction · 0.64
TEST_FFunction · 0.64
TEST_PFunction · 0.64