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

Function BoxOffsets

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

Source from the content-addressed store, hash-verified

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