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

Function VerifyAllBetween

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

Verifies that each 32-bit element is between min and max.

Source from the content-addressed store, hash-verified

202
203// Verifies that each 32-bit element is between min and max.
204void VerifyAllBetween(const Datum& d, int32_t min, int32_t max) {
205 int64_t length = d.length();
206 const int32_t* n = reinterpret_cast<const int32_t*>(d.array()->buffers[1]->data());
207 for (int64_t i = 0; i < length; i++) {
208 ASSERT_GE(n[i], min) << "Value must be between " << min << " and " << max << ", got "
209 << n[i];
210 ASSERT_LE(n[i], max) << "Value must be between " << min << " and " << max << ", got "
211 << n[i];
212 }
213}
214
215void VerifyNationKey(const Datum& d) { VerifyAllBetween(d, 0, 24); }
216

Callers 6

VerifyNationKeyFunction · 0.85
VerifyPartFunction · 0.85
VerifyPartSuppFunction · 0.85
VerifyOrdersFunction · 0.85
VerifyLineitemFunction · 0.85
VerifyNationFunction · 0.85

Calls 3

lengthMethod · 0.45
dataMethod · 0.45
arrayMethod · 0.45

Tested by

no test coverage detected