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

Function ChunkResolver

cpp/src/arrow/chunk_resolver.h:88–99  ·  view source on GitHub ↗

\brief Construct a ChunkResolver from a vector of chunks.size() + 1 offsets. The first offset must be 0 and the last offset must be the logical length of the chunked array. Each offset before the last represents the starting logical index of the corresponding chunk.

Source from the content-addressed store, hash-verified

86 /// chunked array. Each offset before the last represents the starting logical index of
87 /// the corresponding chunk.
88 explicit ChunkResolver(std::vector<int64_t> offsets) noexcept
89 : offsets_(std::move(offsets)), cached_chunk_(0) {
90#ifndef NDEBUG
91 assert(offsets_.size() >= 1);
92 assert(offsets_[0] == 0);
93 for (size_t i = 1; i < offsets_.size(); i++) {
94 assert(offsets_[i] >= offsets_[i - 1]);
95 }
96 assert(offsets_.size() - 1 <=
97 static_cast<size_t>(std::numeric_limits<int32_t>::max()));
98#endif
99 }
100
101 ChunkResolver(ChunkResolver&& other) noexcept;
102 ChunkResolver& operator=(ChunkResolver&& other) noexcept;

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected