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

Method run_end

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

Pre-condition: physical_pos < RunEndsArray(array_span_).length);

Source from the content-addressed store, hash-verified

415
416 // Pre-condition: physical_pos < RunEndsArray(array_span_).length);
417 inline int64_t run_end(int64_t physical_pos) const {
418 assert(physical_pos < RunEndsArray(array_span_).length);
419 // Logical index of the end of the run at physical_pos with offset applied
420 const int64_t logical_run_end =
421 std::max<int64_t>(static_cast<int64_t>(run_ends_[physical_pos]) - offset(), 0);
422 // The current run may go further than the logical length, cap it
423 return std::min(logical_run_end, length());
424 }
425
426 private:
427 const ArraySpan& array_span_;

Callers

nothing calls this directly

Calls 2

offsetFunction · 0.70
lengthFunction · 0.70

Tested by

no test coverage detected