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

Function WriteSingleRunEnd

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

Source from the content-addressed store, hash-verified

102}
103
104void WriteSingleRunEnd(ArrayData* run_ends_data, int64_t run_end) {
105 DCHECK_GT(run_end, 0);
106 DCHECK(is_run_end_type(run_ends_data->type->id()));
107 auto* output_run_ends = run_ends_data->template GetMutableValues<uint8_t>(1);
108 switch (run_ends_data->type->id()) {
109 case Type::INT16:
110 *reinterpret_cast<int16_t*>(output_run_ends) = static_cast<int16_t>(run_end);
111 break;
112 case Type::INT32:
113 *reinterpret_cast<int32_t*>(output_run_ends) = static_cast<int32_t>(run_end);
114 break;
115 default:
116 DCHECK_EQ(run_ends_data->type->id(), Type::INT64);
117 *reinterpret_cast<int64_t*>(output_run_ends) = static_cast<int64_t>(run_end);
118 break;
119 }
120}
121
122Result<std::shared_ptr<ArrayData>> MakeNullREEArray(
123 const std::shared_ptr<DataType>& run_end_type, int64_t logical_length,

Callers 1

MakeNullREEArrayFunction · 0.85

Calls 2

is_run_end_typeFunction · 0.85
idMethod · 0.45

Tested by

no test coverage detected