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

Function GetStorageChunkedArray

python/pyarrow/src/arrow/python/arrow_to_pandas.cc:2347–2355  ·  view source on GitHub ↗

Helper function for extension chunked arrays Constructing a storage chunked array of an extension chunked array

Source from the content-addressed store, hash-verified

2345// Helper function for extension chunked arrays
2346// Constructing a storage chunked array of an extension chunked array
2347std::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
2358Result<std::shared_ptr<ChunkedArray>> GetDecodedChunkedArray(

Callers 2

GetBlockTypeMethod · 0.85

Calls 4

storage_typeMethod · 0.80
emplace_backMethod · 0.80
typeMethod · 0.45
num_chunksMethod · 0.45

Tested by

no test coverage detected