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

Function GetPhysicalArray

cpp/src/arrow/compute/kernels/vector_sort_internal.h:571–576  ·  view source on GitHub ↗

We could try to reproduce the concrete Array classes' facilities (such as cached raw values pointer) in a separate hierarchy of physical accessors, but doing so ends up too cumbersome. Instead, we simply create the desired concrete Array objects.

Source from the content-addressed store, hash-verified

569// physical accessors, but doing so ends up too cumbersome.
570// Instead, we simply create the desired concrete Array objects.
571inline std::shared_ptr<Array> GetPhysicalArray(
572 const Array& array, const std::shared_ptr<DataType>& physical_type) {
573 auto new_data = array.data()->Copy();
574 new_data->type = physical_type;
575 return MakeArray(std::move(new_data));
576}
577
578inline ArrayVector GetPhysicalChunks(const ArrayVector& chunks,
579 const std::shared_ptr<DataType>& physical_type) {

Callers 2

GetPhysicalChunksFunction · 0.85

Calls 3

MakeArrayFunction · 0.70
CopyMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected