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

Function GetArrayView

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

Source from the content-addressed store, hash-verified

932namespace internal {
933
934Result<std::shared_ptr<ArrayData>> GetArrayView(
935 const std::shared_ptr<ArrayData>& data, const std::shared_ptr<DataType>& out_type) {
936 ViewDataImpl impl;
937 impl.root_in_type = data->type;
938 impl.root_out_type = out_type;
939 AccumulateLayouts(impl.root_in_type, &impl.in_layouts);
940 AccumulateArrayData(data, &impl.in_data);
941 impl.in_data_length = data->length;
942
943 std::shared_ptr<ArrayData> out_data;
944 // Dummy field for output type
945 auto out_field = field("", out_type);
946 RETURN_NOT_OK(impl.MakeDataView(out_field, &out_data));
947 RETURN_NOT_OK(impl.CheckInputExhausted());
948 return out_data;
949}
950
951} // namespace internal
952} // 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