diff --git a/velox/vector/fuzzer/Utils.h b/velox/vector/fuzzer/Utils.h index 5f51c3a52024f..0248b08f942fa 100644 --- a/velox/vector/fuzzer/Utils.h +++ b/velox/vector/fuzzer/Utils.h @@ -23,6 +23,13 @@ namespace facebook::velox { using FuzzerGenerator = std::mt19937; +enum class FuzzerTimestampPrecision : int8_t { + kNanoSeconds = 0, + kMicroSeconds = 1, + kMilliSeconds = 2, + kSeconds = 3, +}; + namespace generator_spec_utils { bool coinToss(FuzzerGenerator& rng, double threshold); diff --git a/velox/vector/fuzzer/VectorFuzzer.h b/velox/vector/fuzzer/VectorFuzzer.h index 6ebbf03dc0a65..0cd9a510305c7 100644 --- a/velox/vector/fuzzer/VectorFuzzer.h +++ b/velox/vector/fuzzer/VectorFuzzer.h @@ -17,12 +17,12 @@ #pragma once #include -#include #include "velox/type/Type.h" #include "velox/vector/BaseVector.h" #include "velox/vector/ComplexVector.h" #include "velox/vector/fuzzer/GeneratorSpec.h" +#include "velox/vector/fuzzer/Utils.h" namespace facebook::velox { @@ -140,12 +140,7 @@ class VectorFuzzer { /// Control the precision of timestamps generated. By default generate using /// nanoseconds precision. - enum class TimestampPrecision : int8_t { - kNanoSeconds = 0, - kMicroSeconds = 1, - kMilliSeconds = 2, - kSeconds = 3, - }; + using TimestampPrecision = FuzzerTimestampPrecision; TimestampPrecision timestampPrecision{TimestampPrecision::kNanoSeconds}; /// If true, fuzz() will randomly generate lazy vectors and fuzzInputRow()