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

Function PreallocateRunEndsArray

cpp/src/arrow/compute/kernels/ree_util_internal.cc:49–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47}
48
49Result<std::shared_ptr<ArrayData>> PreallocateRunEndsArray(
50 const std::shared_ptr<DataType>& run_end_type, int64_t physical_length,
51 MemoryPool* pool) {
52 DCHECK(is_run_end_type(run_end_type->id()));
53 ARROW_ASSIGN_OR_RAISE(
54 auto run_ends_buffer,
55 AllocateBuffer(physical_length * run_end_type->byte_width(), pool));
56 return ArrayData::Make(run_end_type, physical_length,
57 {NULLPTR, std::move(run_ends_buffer)}, /*null_count=*/0);
58}
59
60Result<std::shared_ptr<ArrayData>> PreallocateValuesArray(
61 const std::shared_ptr<DataType>& value_type, bool has_validity_buffer, int64_t length,

Callers

nothing calls this directly

Calls 3

is_run_end_typeFunction · 0.85
MakeFunction · 0.50
idMethod · 0.45

Tested by

no test coverage detected