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

Function randShortDecimalType

bolt/vector/fuzzer/VectorFuzzer.cpp:225–232  ·  view source on GitHub ↗

Generate a short decimal TypePtr with random / special precision and scale.

Source from the content-addressed store, hash-verified

223
224// Generate a short decimal TypePtr with random / special precision and scale.
225inline TypePtr randShortDecimalType(FuzzerGenerator& rng) {
226 auto [precision, scale] = randPrecisionScale(
227 rng,
228 ShortDecimalType::kMinPrecision == 0 ? 1
229 : ShortDecimalType::kMinPrecision,
230 ShortDecimalType::kMaxPrecision);
231 return DECIMAL(precision, scale);
232}
233
234// Generate a long decimal TypePtr with random / special precision and scale.
235inline TypePtr randLongDecimalType(FuzzerGenerator& rng) {

Callers 2

randShortDecimalTypeMethod · 0.85
randTypeFunction · 0.85

Calls 2

randPrecisionScaleFunction · 0.85
DECIMALFunction · 0.85

Tested by

no test coverage detected