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

Method VisitBaseBinary

cpp/src/arrow/util/byte_size.cc:172–189  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

170
171 template <typename BaseBinaryType>
172 Status VisitBaseBinary(const BaseBinaryType& type) const {
173 using offset_type = typename BaseBinaryType::offset_type;
174 RETURN_NOT_OK(VisitBitmap(input.buffers[0]));
175
176 const Buffer& offsets_buffer = *input.buffers[1];
177 RETURN_NOT_OK(
178 range_starts->Append(reinterpret_cast<uint64_t>(offsets_buffer.data())));
179 RETURN_NOT_OK(range_offsets->Append(sizeof(offset_type) * offset));
180 RETURN_NOT_OK(range_lengths->Append(sizeof(offset_type) * length));
181
182 const offset_type* offsets = input.GetValues<offset_type>(1, offset);
183 const Buffer& values = *input.buffers[2];
184 offset_type start = offsets[0];
185 offset_type end = offsets[length];
186 RETURN_NOT_OK(range_starts->Append(reinterpret_cast<uint64_t>(values.data())));
187 RETURN_NOT_OK(range_offsets->Append(static_cast<uint64_t>(start)));
188 return range_lengths->Append(static_cast<uint64_t>(end - start));
189 }
190
191 Status Visit(const BinaryType& type) const { return VisitBaseBinary(type); }
192

Callers

nothing calls this directly

Calls 2

AppendMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected