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

Method run_end

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

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

Source from the content-addressed store, hash-verified

425
426 // Pre-condition: physical_pos < RunEndsArray(array_span_).length);
427 inline int64_t run_end(int64_t physical_pos) const {
428 assert(physical_pos < RunEndsArray(array_span_).length);
429 // Logical index of the end of the run at physical_pos with offset applied
430 const int64_t logical_run_end =
431 std::max<int64_t>(static_cast<int64_t>(run_ends_[physical_pos]) - offset(), 0);
432 // The current run may go further than the logical length, cap it
433 return std::min(logical_run_end, length());
434 }
435
436 private:
437 const ArraySpan& array_span_;

Callers

nothing calls this directly

Calls 2

offsetFunction · 0.70
lengthFunction · 0.70

Tested by

no test coverage detected