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

Function GetArrayView

cpp/src/arrow/array/data.cc:945–960  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

943namespace internal {
944
945Result<std::shared_ptr<ArrayData>> GetArrayView(
946 const std::shared_ptr<ArrayData>& data, const std::shared_ptr<DataType>& out_type) {
947 ViewDataImpl impl;
948 impl.root_in_type = data->type;
949 impl.root_out_type = out_type;
950 AccumulateLayouts(impl.root_in_type, &impl.in_layouts);
951 AccumulateArrayData(data, &impl.in_data);
952 impl.in_data_length = data->length;
953
954 std::shared_ptr<ArrayData> out_data;
955 // Dummy field for output type
956 auto out_field = field("", out_type);
957 RETURN_NOT_OK(impl.MakeDataView(out_field, &out_data));
958 RETURN_NOT_OK(impl.CheckInputExhausted());
959 return out_data;
960}
961
962} // namespace internal
963} // namespace arrow

Callers 4

GetDictionaryViewMethod · 0.85
ViewMethod · 0.85
ExecuteImplMethod · 0.85
DecodeMethod · 0.85

Calls 5

AccumulateLayoutsFunction · 0.85
AccumulateArrayDataFunction · 0.85
MakeDataViewMethod · 0.80
CheckInputExhaustedMethod · 0.80
fieldFunction · 0.50

Tested by

no test coverage detected