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

Method fuzzInputRow

bolt/row/tests/CompactRowTest.cpp:48–57  ·  view source on GitHub ↗

TODO Replace with VectorFuzzer::fuzzInputRow once https://github.com/facebookincubator/velox/issues/6195 is fixed.

Source from the content-addressed store, hash-verified

46 /// TODO Replace with VectorFuzzer::fuzzInputRow once
47 /// https://github.com/facebookincubator/velox/issues/6195 is fixed.
48 RowVectorPtr fuzzInputRow(VectorFuzzer& fuzzer, const RowTypePtr& rowType) {
49 const auto size = fuzzer.getOptions().vectorSize;
50 std::vector<VectorPtr> children;
51 for (auto i = 0; i < rowType->size(); ++i) {
52 children.push_back(fuzzer.fuzz(rowType->childAt(i), size));
53 }
54
55 return std::make_shared<RowVector>(
56 pool_.get(), rowType, nullptr, size, std::move(children));
57 }
58
59 void testRoundTrip(const RowVectorPtr& data) {
60 SCOPED_TRACE(data->toString());

Callers 2

makeDataMethod · 0.45
doFuzzTestMethod · 0.45

Calls 5

fuzzMethod · 0.80
childAtMethod · 0.80
sizeMethod · 0.45
push_backMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected