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

Method generateProbeInput

bolt/exec/tests/JoinFuzzer.cpp:249–268  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

247 // keys and use these as build keys.
248 // TODO Add a few random rows as well.
249 std::vector<RowVectorPtr> input;
250 for (const auto& probe : probeInput) {
251 auto numRows = 1 + probe->size() / 10;
252 auto build = BaseVector::create<RowVector>(rowType, numRows, probe->pool());
253
254 // Pick probe side rows to copy.
255 std::vector<vector_size_t> rowNumbers(numRows);
256 for (auto i = 0; i < numRows; ++i) {
257 rowNumbers[i] = randInt(0, probe->size() - 1);
258 }
259
260 SelectivityVector rows(numRows);
261 for (auto i = 0; i < probeKeys.size(); ++i) {
262 build->childAt(i)->resize(numRows);
263 build->childAt(i)->copy(
264 probe->childAt(i).get(), rows, rowNumbers.data(), false);
265 }
266
267 for (auto i = 0; i < numPayload; ++i) {
268 auto column = i + probeKeys.size();
269 build->childAt(column) =
270 vectorFuzzer_.fuzz(rowType->childAt(column), numRows);
271 }

Callers

nothing calls this directly

Calls 5

ROWFunction · 0.85
push_backMethod · 0.45
sizeMethod · 0.45
randTypeMethod · 0.45
fuzzInputRowMethod · 0.45

Tested by

no test coverage detected