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

Function FindPhysicalIndex

cpp/src/arrow/util/ree_util.h:68–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66/// found in run_ends
67template <typename RunEndCType>
68int64_t FindPhysicalIndex(const RunEndCType* run_ends, int64_t run_ends_size, int64_t i,
69 int64_t absolute_offset) {
70 assert(absolute_offset + i >= 0);
71 auto it = std::upper_bound(run_ends, run_ends + run_ends_size, absolute_offset + i);
72 int64_t result = std::distance(run_ends, it);
73 assert(result <= run_ends_size);
74 return result;
75}
76
77/// \brief Uses binary-search to calculate the range of physical values (and
78/// run-ends) necessary to represent the logical range of values from

Callers 5

TYPED_TEST_PFunction · 0.70
PhysicalIndexMethod · 0.70
IsNullRunEndEncodedMethod · 0.50
FindPhysicalOffsetMethod · 0.50
VisitMethod · 0.50

Calls

no outgoing calls

Tested by 1

TYPED_TEST_PFunction · 0.56