| 57 | } |
| 58 | |
| 59 | std::vector<RowVectorPtr> generateSortedVectors( |
| 60 | const int32_t numVectors, |
| 61 | const size_t vectorSize) { |
| 62 | const VectorFuzzer::Options fuzzerOpts{.vectorSize = vectorSize}; |
| 63 | const auto vectors = createVectors(numVectors, inputType_, fuzzerOpts); |
| 64 | const auto sortBuffer = std::make_unique<SortBuffer>( |
| 65 | inputType_, |
| 66 | sortColumnIndices_, |
| 67 | sortCompareFlags_, |
| 68 | pool_.get(), |
| 69 | &nonReclaimableSection_); |
| 70 | for (const auto& vector : vectors) { |
| 71 | sortBuffer->addInput(vector); |
| 72 | } |
| 73 | sortBuffer->noMoreInput(); |
| 74 | std::vector<RowVectorPtr> sortedVectors; |
| 75 | sortedVectors.reserve(numVectors); |
| 76 | for (auto i = 0; i < numVectors; ++i) { |
| 77 | sortedVectors.emplace_back(sortBuffer->getOutput(vectorSize)); |
| 78 | } |
| 79 | return sortedVectors; |
| 80 | } |
| 81 | |
| 82 | SpillFiles generateSortedSpillFiles( |
| 83 | const std::vector<RowVectorPtr>& sortedVectors) { |
nothing calls this directly
no test coverage detected