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

Function MakeChunksOffsets

cpp/src/arrow/chunk_resolver.cc:46–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44
45template <typename T>
46inline std::vector<int64_t> MakeChunksOffsets(std::span<T> chunks) {
47 std::vector<int64_t> offsets(chunks.size() + 1);
48 int64_t offset = 0;
49 std::transform(chunks.begin(), chunks.end(), offsets.begin(),
50 [&offset](const T& chunk) {
51 auto curr_offset = offset;
52 offset += GetLength(chunk);
53 return curr_offset;
54 });
55 offsets[chunks.size()] = offset;
56 return offsets;
57}
58
59template <typename IndexType>
60inline TypedChunkLocation<IndexType> ResolveOneInline(uint32_t num_offsets,

Callers 1

ChunkResolverMethod · 0.85

Calls 4

GetLengthFunction · 0.70
sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected