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

Function GetPhysicalArray

cpp/src/arrow/compute/kernels/vector_sort_internal.h:575–580  ·  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

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

Callers 3

GetPhysicalChunksFunction · 0.85
MakeMethod · 0.85

Calls 3

MakeArrayFunction · 0.70
CopyMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected