MCPcopy Create free account
hub / github.com/apache/arrow / VerifyRegion

Function VerifyRegion

cpp/src/arrow/acero/tpch_node_test.cc:585–601  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

583}
584
585void 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
603TEST(TpchNode, Region) {
604 ASSERT_OK_AND_ASSIGN(auto res, GenerateTable(&TpchGen::Region));

Callers 1

TESTFunction · 0.85

Calls 3

VerifyUniqueKeyFunction · 0.85
VerifyOneOfFunction · 0.85
ValidateBatchFunction · 0.70

Tested by

no test coverage detected