Helper function for extension chunked arrays Constructing a storage chunked array of an extension chunked array
| 2345 | // Helper function for extension chunked arrays |
| 2346 | // Constructing a storage chunked array of an extension chunked array |
| 2347 | std::shared_ptr<ChunkedArray> GetStorageChunkedArray(std::shared_ptr<ChunkedArray> arr) { |
| 2348 | auto value_type = checked_cast<const ExtensionType&>(*arr->type()).storage_type(); |
| 2349 | ArrayVector storage_arrays; |
| 2350 | for (int c = 0; c < arr->num_chunks(); c++) { |
| 2351 | const auto& arr_ext = checked_cast<const ExtensionArray&>(*arr->chunk(c)); |
| 2352 | storage_arrays.emplace_back(arr_ext.storage()); |
| 2353 | } |
| 2354 | return std::make_shared<ChunkedArray>(std::move(storage_arrays), value_type); |
| 2355 | }; |
| 2356 | |
| 2357 | // Helper function to decode RunEndEncodedArray |
| 2358 | Result<std::shared_ptr<ChunkedArray>> GetDecodedChunkedArray( |
no test coverage detected