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

Function VerifyUniqueKey

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

Verifies that each element is seen exactly once, and that it's between min and max inclusive

Source from the content-addressed store, hash-verified

85// Verifies that each element is seen exactly once, and that it's between min and max
86// inclusive
87void VerifyUniqueKey(std::unordered_set<int32_t>* seen, const Datum& d, int32_t min,
88 int32_t max) {
89 const int32_t* keys = reinterpret_cast<const int32_t*>(d.array()->buffers[1]->data());
90 int64_t num_keys = d.length();
91 for (int64_t i = 0; i < num_keys; i++) {
92 ASSERT_TRUE(seen->insert(keys[i]).second);
93 ASSERT_LE(keys[i], max);
94 ASSERT_GE(keys[i], min);
95 }
96}
97
98void VerifyStringAndNumber_Single(std::string_view row, std::string_view prefix,
99 const int64_t i, const int32_t* nums,

Callers 6

VerifySupplierFunction · 0.85
VerifyPartFunction · 0.85
VerifyCustomerFunction · 0.85
VerifyOrdersFunction · 0.85
VerifyNationFunction · 0.85
VerifyRegionFunction · 0.85

Calls 4

dataMethod · 0.45
arrayMethod · 0.45
lengthMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected