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

Function PreallocateREEArray

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

Source from the content-addressed store, hash-verified

86}
87
88Result<std::shared_ptr<ArrayData>> PreallocateREEArray(
89 std::shared_ptr<RunEndEncodedType> ree_type, bool has_validity_buffer,
90 int64_t logical_length, int64_t physical_length, MemoryPool* pool,
91 int64_t data_buffer_size) {
92 ARROW_ASSIGN_OR_RAISE(
93 auto run_ends_data,
94 PreallocateRunEndsArray(ree_type->run_end_type(), physical_length, pool));
95 ARROW_ASSIGN_OR_RAISE(auto values_data, PreallocateValuesArray(
96 ree_type->value_type(), has_validity_buffer,
97 physical_length, pool, data_buffer_size));
98
99 return ArrayData::Make(std::move(ree_type), logical_length, {NULLPTR},
100 {std::move(run_ends_data), std::move(values_data)},
101 /*null_count=*/0);
102}
103
104void WriteSingleRunEnd(ArrayData* run_ends_data, int64_t run_end) {
105 DCHECK_GT(run_end, 0);

Callers

nothing calls this directly

Calls 1

MakeFunction · 0.50

Tested by

no test coverage detected