| 258 | } |
| 259 | |
| 260 | std::shared_ptr<ArrayData> ArrayWriter::copy_to_array_data() { |
| 261 | auto array_data = std::make_shared<ArrayData>(type_); |
| 262 | std::shared_ptr<Buffer> buf; |
| 263 | allocate_buffer(size(), &buf); |
| 264 | buffer_->copy(starting_offset_, size(), buf); |
| 265 | array_data->point_to(buf, 0, size()); |
| 266 | return array_data; |
| 267 | } |
| 268 | |
| 269 | } // namespace row |
| 270 | } // namespace fory |