| 583 | } |
| 584 | |
| 585 | void VerifyRegion(const std::vector<ExecBatch>& batches, |
| 586 | double scale_factor = kDefaultScaleFactor) { |
| 587 | constexpr int64_t kExpectedRows = 5; |
| 588 | int64_t num_rows = 0; |
| 589 | |
| 590 | std::unordered_set<int32_t> seen_regionkey; |
| 591 | for (auto& batch : batches) { |
| 592 | ValidateBatch(batch); |
| 593 | VerifyUniqueKey(&seen_regionkey, batch[0], 0, kExpectedRows - 1); |
| 594 | VerifyOneOf(batch[1], |
| 595 | /*byte_width=*/25, |
| 596 | {"AFRICA", "AMERICA", "ASIA", "EUROPE", "MIDDLE EAST"}); |
| 597 | |
| 598 | num_rows += batch.length; |
| 599 | } |
| 600 | ASSERT_EQ(num_rows, 5); |
| 601 | } |
| 602 | |
| 603 | TEST(TpchNode, Region) { |
| 604 | ASSERT_OK_AND_ASSIGN(auto res, GenerateTable(&TpchGen::Region)); |
no test coverage detected