| 284 | } |
| 285 | |
| 286 | Status AppendArraySlice(const ArraySpan& array, int64_t offset, |
| 287 | int64_t length) override { |
| 288 | auto bitmap = array.GetValues<uint8_t>(0, 0); |
| 289 | auto offsets = array.GetValues<offset_type>(1); |
| 290 | auto data = array.GetValues<uint8_t>(2, 0); |
| 291 | auto total_length = offsets[offset + length] - offsets[offset]; |
| 292 | ARROW_RETURN_NOT_OK(Reserve(length)); |
| 293 | ARROW_RETURN_NOT_OK(ReserveData(total_length)); |
| 294 | for (int64_t i = 0; i < length; i++) { |
| 295 | if (!bitmap || bit_util::GetBit(bitmap, array.offset + offset + i)) { |
| 296 | const offset_type start = offsets[offset + i]; |
| 297 | const offset_type end = offsets[offset + i + 1]; |
| 298 | UnsafeAppend(data + start, end - start); |
| 299 | } else { |
| 300 | UnsafeAppendNull(); |
| 301 | } |
| 302 | } |
| 303 | return Status::OK(); |
| 304 | } |
| 305 | |
| 306 | void Reset() override { |
| 307 | ArrayBuilder::Reset(); |
nothing calls this directly
no test coverage detected