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

Function Resolve

cpp/src/arrow/chunk_resolver.h:125–130  ·  view source on GitHub ↗

\brief Resolve a logical index to a ChunkLocation. The returned ChunkLocation contains the chunk index and the within-chunk index equivalent to the logical index. \pre `index >= 0` \post `location.chunk_index` in `[0, chunks.size()]` \param index The logical index to resolve \return ChunkLocation with a valid chunk_index if index is within bounds, or with `chunk_index == chunks.size()` if logica

Source from the content-addressed store, hash-verified

123 /// bounds, or with `chunk_index == chunks.size()` if logical index is
124 /// `>= chunked_array.length()`.
125 inline ChunkLocation Resolve(int64_t index) const {
126 const auto cached_chunk = cached_chunk_.load(std::memory_order_relaxed);
127 const auto chunk_index =
128 ResolveChunkIndex</*StoreCachedChunk=*/true>(index, cached_chunk);
129 return ChunkLocation{chunk_index, index - offsets_[chunk_index]};
130 }
131
132 /// \brief Resolve a logical index to a ChunkLocation.
133 ///

Callers 2

ResolveKernelsFunction · 0.85
MakeAggregateNodeArgsMethod · 0.85

Calls 1

loadMethod · 0.45

Tested by

no test coverage detected