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

Method DecodeHelper

cpp/src/arrow/compute/row/encode_internal.h:157–186  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

155
156 template <bool is_row_fixed_length, class COPY_FN>
157 static inline void DecodeHelper(uint32_t start_row, uint32_t num_rows,
158 uint32_t offset_within_row,
159 const RowTableImpl* rows_const,
160 RowTableImpl* rows_mutable_maybe_null,
161 const KeyColumnArray* col_const,
162 KeyColumnArray* col_mutable_maybe_null,
163 COPY_FN copy_fn) {
164 ARROW_DCHECK(col_const && col_const->metadata().is_fixed_length);
165 uint32_t col_width = col_const->metadata().fixed_length;
166
167 if (is_row_fixed_length) {
168 for (uint32_t i = 0; i < num_rows; ++i) {
169 const uint8_t* src;
170 uint8_t* dst;
171 src = rows_const->fixed_length_rows(start_row + i) + offset_within_row;
172 dst = col_mutable_maybe_null->mutable_data(1) + col_width * i;
173 copy_fn(dst, src, col_width);
174 }
175 } else {
176 const RowTableImpl::offset_type* row_offsets = rows_const->offsets();
177 for (uint32_t i = 0; i < num_rows; ++i) {
178 const uint8_t* src;
179 uint8_t* dst;
180 src = rows_const->var_length_rows() + row_offsets[start_row + i] +
181 offset_within_row;
182 dst = col_mutable_maybe_null->mutable_data(1) + col_width * i;
183 copy_fn(dst, src, col_width);
184 }
185 }
186 }
187
188 template <bool is_row_fixed_length>
189 static void DecodeImp(uint32_t start_row, uint32_t num_rows, uint32_t offset_within_row,

Callers

nothing calls this directly

Calls 3

metadataMethod · 0.45
mutable_dataMethod · 0.45
offsetsMethod · 0.45

Tested by

no test coverage detected