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

Function ResolveManyInline

cpp/src/arrow/chunk_resolver.cc:97–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

95/// \pre num_offsets - 1 <= std::numeric_limits<IndexType>::max()
96template <typename IndexType>
97void ResolveManyInline(uint32_t num_offsets, const int64_t* signed_offsets,
98 int64_t n_indices, const IndexType* logical_index_vec,
99 TypedChunkLocation<IndexType>* out_chunk_location_vec,
100 int32_t chunk_hint) {
101 auto* offsets = reinterpret_cast<const uint64_t*>(signed_offsets);
102 const auto num_chunks = static_cast<int32_t>(num_offsets - 1);
103 // chunk_hint in [0, num_offsets) per the precondition.
104 for (int64_t i = 0; i < n_indices; i++) {
105 const auto typed_logical_index = logical_index_vec[i];
106 const auto loc = ResolveOneInline(num_offsets, offsets, typed_logical_index,
107 num_chunks, chunk_hint);
108 out_chunk_location_vec[i] = loc;
109 chunk_hint = static_cast<int32_t>(loc.chunk_index);
110 }
111}
112
113} // namespace
114

Callers 1

ResolveManyImplMethod · 0.85

Calls 1

ResolveOneInlineFunction · 0.85

Tested by

no test coverage detected