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

Method generateInputData

bolt/exec/fuzzer/AggregationFuzzerBase.cpp:298–332  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

296}
297
298std::vector<RowVectorPtr> AggregationFuzzerBase::generateInputData(
299 std::vector<std::string> names,
300 std::vector<TypePtr> types,
301 const std::optional<CallableSignature>& signature) {
302 std::shared_ptr<InputGenerator> generator;
303 if (signature.has_value()) {
304 generator = findInputGenerator(signature.value());
305 }
306
307 const auto size = vectorFuzzer_.getOptions().vectorSize;
308
309 auto inputType = ROW(std::move(names), std::move(types));
310 std::vector<RowVectorPtr> input;
311 for (auto i = 0; i < FLAGS_num_batches; ++i) {
312 std::vector<VectorPtr> children;
313
314 if (generator != nullptr) {
315 children = generator->generate(
316 signature->args, vectorFuzzer_, rng_, pool_.get());
317 }
318
319 for (auto j = children.size(); j < inputType->size(); ++j) {
320 children.push_back(vectorFuzzer_.fuzz(inputType->childAt(j), size));
321 }
322
323 input.push_back(std::make_shared<RowVector>(
324 pool_.get(), inputType, nullptr, size, std::move(children)));
325 }
326
327 if (generator != nullptr) {
328 generator->reset();
329 }
330
331 return input;
332}
333
334std::vector<RowVectorPtr> AggregationFuzzerBase::generateInputDataWithRowNumber(
335 std::vector<std::string> names,

Callers

nothing calls this directly

Calls 10

ROWFunction · 0.85
has_valueMethod · 0.80
fuzzMethod · 0.80
childAtMethod · 0.80
valueMethod · 0.45
generateMethod · 0.45
getMethod · 0.45
sizeMethod · 0.45
push_backMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected