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

Function ResolveWithHint

cpp/src/arrow/chunk_resolver.h:145–150  ·  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 \param hint ChunkLocation{} or the last ChunkLocation returned by this ChunkResolver. \return ChunkLocation with a valid c

Source from the content-addressed store, hash-verified

143 /// bounds, or with `chunk_index == chunks.size()` if logical index is
144 /// `>= chunked_array.length()`.
145 inline ChunkLocation ResolveWithHint(int64_t index, ChunkLocation hint) const {
146 assert(hint.chunk_index < static_cast<uint32_t>(offsets_.size()));
147 const auto chunk_index = ResolveChunkIndex</*StoreCachedChunk=*/false>(
148 index, static_cast<int32_t>(hint.chunk_index));
149 return ChunkLocation{chunk_index, index - offsets_[chunk_index]};
150 }
151
152 /// \brief Resolve `n_indices` logical indices to chunk indices.
153 ///

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected