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

Function BoxOffsets

cpp/src/arrow/array/array_nested.cc:355–364  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

353}
354
355std::shared_ptr<Array> BoxOffsets(const std::shared_ptr<DataType>& boxed_type,
356 const ArrayData& data) {
357 const int64_t num_offsets =
358 is_list_view(data.type->id()) ? data.length : data.length + 1;
359 std::vector<std::shared_ptr<Buffer>> buffers = {nullptr, data.buffers[1]};
360 auto offsets_data =
361 std::make_shared<ArrayData>(boxed_type, /*length=*/num_offsets, std::move(buffers),
362 /*null_count=*/0, data.offset);
363 return MakeArray(offsets_data);
364}
365
366std::shared_ptr<Array> BoxSizes(const std::shared_ptr<DataType>& boxed_type,
367 const ArrayData& data) {

Callers 1

offsetsMethod · 0.85

Calls 3

MakeArrayFunction · 0.70
is_list_viewFunction · 0.50
idMethod · 0.45

Tested by

no test coverage detected