TODO Replace with VectorFuzzer::fuzzInputRow once https://github.com/facebookincubator/velox/issues/6195 is fixed.
| 46 | /// TODO Replace with VectorFuzzer::fuzzInputRow once |
| 47 | /// https://github.com/facebookincubator/velox/issues/6195 is fixed. |
| 48 | RowVectorPtr fuzzInputRow(VectorFuzzer& fuzzer, const RowTypePtr& rowType) { |
| 49 | const auto size = fuzzer.getOptions().vectorSize; |
| 50 | std::vector<VectorPtr> children; |
| 51 | for (auto i = 0; i < rowType->size(); ++i) { |
| 52 | children.push_back(fuzzer.fuzz(rowType->childAt(i), size)); |
| 53 | } |
| 54 | |
| 55 | return std::make_shared<RowVector>( |
| 56 | pool_.get(), rowType, nullptr, size, std::move(children)); |
| 57 | } |
| 58 | |
| 59 | void testRoundTrip(const RowVectorPtr& data) { |
| 60 | SCOPED_TRACE(data->toString()); |