| 555 | } |
| 556 | |
| 557 | void VerifyNation(const std::vector<ExecBatch>& batches, |
| 558 | double scale_factor = kDefaultScaleFactor) { |
| 559 | constexpr int64_t kExpectedRows = 25; |
| 560 | int64_t num_rows = 0; |
| 561 | |
| 562 | std::unordered_set<int32_t> seen_nationkey; |
| 563 | for (auto& batch : batches) { |
| 564 | ValidateBatch(batch); |
| 565 | VerifyUniqueKey(&seen_nationkey, batch[0], 0, kExpectedRows - 1); |
| 566 | VerifyOneOf( |
| 567 | batch[1], |
| 568 | /*byte_width=*/25, |
| 569 | {"ALGERIA", "ARGENTINA", "BRAZIL", "CANADA", "EGYPT", |
| 570 | "ETHIOPIA", "FRANCE", "GERMANY", "INDIA", "INDONESIA", |
| 571 | "IRAN", "IRAQ", "JAPAN", "JORDAN", "KENYA", |
| 572 | "MOROCCO", "MOZAMBIQUE", "PERU", "CHINA", "ROMANIA", |
| 573 | "SAUDI ARABIA", "VIETNAM", "RUSSIA", "UNITED KINGDOM", "UNITED STATES"}); |
| 574 | VerifyAllBetween(batch[2], 0, 4); |
| 575 | num_rows += batch.length; |
| 576 | } |
| 577 | ASSERT_EQ(num_rows, kExpectedRows); |
| 578 | } |
| 579 | |
| 580 | TEST(TpchNode, Nation) { |
| 581 | ASSERT_OK_AND_ASSIGN(auto res, GenerateTable(&TpchGen::Nation)); |
no test coverage detected