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

Function MakeNullREEArray

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

Source from the content-addressed store, hash-verified

120}
121
122Result<std::shared_ptr<ArrayData>> MakeNullREEArray(
123 const std::shared_ptr<DataType>& run_end_type, int64_t logical_length,
124 MemoryPool* pool) {
125 auto ree_type = std::make_shared<RunEndEncodedType>(run_end_type, null());
126 const int64_t physical_length = logical_length > 0 ? 1 : 0;
127 ARROW_ASSIGN_OR_RAISE(auto run_ends_data,
128 PreallocateRunEndsArray(run_end_type, physical_length, pool));
129 if (logical_length > 0) {
130 WriteSingleRunEnd(run_ends_data.get(), logical_length);
131 }
132 auto values_data = ArrayData::Make(null(), physical_length, {NULLPTR},
133 /*null_count=*/physical_length);
134 return ArrayData::Make(std::move(ree_type), logical_length, {NULLPTR},
135 {std::move(run_ends_data), std::move(values_data)},
136 /*null_count=*/0);
137}
138
139} // namespace ree_util
140} // namespace internal

Callers

nothing calls this directly

Calls 3

WriteSingleRunEndFunction · 0.85
MakeFunction · 0.50
getMethod · 0.45

Tested by

no test coverage detected