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

Function getElementsVectorLength

bolt/vector/fuzzer/VectorFuzzer.cpp:294–305  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

292}
293
294size_t getElementsVectorLength(
295 const VectorFuzzer::Options& opts,
296 vector_size_t size) {
297 if (opts.containerVariableLength == false &&
298 size * opts.containerLength > opts.complexElementsMaxSize) {
299 BOLT_USER_FAIL(
300 "Requested fixed opts.containerVariableLength can't be satisfied: "
301 "increase opts.complexElementsMaxSize, reduce opts.containerLength"
302 " or make opts.containerVariableLength=true");
303 }
304 return std::min(size * opts.containerLength, opts.complexElementsMaxSize);
305}
306
307int64_t randShortDecimal(const TypePtr& type, FuzzerGenerator& rng) {
308 auto precision = type->asShortDecimal().precision();

Callers 2

fuzzFlatMethod · 0.85
fuzzComplexMethod · 0.85

Calls 1

minFunction · 0.50

Tested by

no test coverage detected