| 44 | }; |
| 45 | |
| 46 | TEST_F(RoundRobinPartitionFunctionTest, basic) { |
| 47 | exec::RoundRobinPartitionFunction partitionFunction(10); |
| 48 | |
| 49 | auto pool = memory::memoryManager()->addLeafPool(); |
| 50 | test::VectorMaker vm(pool.get()); |
| 51 | |
| 52 | auto data = vm.rowVector(ROW({}, {}), 1024); |
| 53 | std::vector<uint32_t> partitions; |
| 54 | for (auto i = 0; i < 31; ++i) { |
| 55 | SCOPED_TRACE(i); |
| 56 | auto partition = partitionFunction.partition(*data, partitions); |
| 57 | ASSERT_TRUE(partition.has_value()); |
| 58 | ASSERT_EQ(i % 10, partition.value()); |
| 59 | ASSERT_TRUE(partitions.empty()); |
| 60 | } |
| 61 | } |
| 62 | |
| 63 | TEST_F(RoundRobinPartitionFunctionTest, spec) { |
| 64 | auto roundRobinSpec = std::make_unique<RoundRobinPartitionFunctionSpec>(); |
nothing calls this directly
no test coverage detected