| 1093 | // the whole column rather than once per list element (GH-50514, GH-50339) |
| 1094 | template <typename ListArrayType> |
| 1095 | std::shared_ptr<Converter> MakeListValuesConverter( |
| 1096 | const std::shared_ptr<ChunkedArray>& chunked_array, |
| 1097 | const std::shared_ptr<arrow::DataType>& value_type) { |
| 1098 | ArrayVector values; |
| 1099 | values.reserve(chunked_array->num_chunks()); |
| 1100 | for (const auto& chunk : chunked_array->chunks()) { |
| 1101 | // Flatten() rather than values() so that only the values that are logically |
| 1102 | // part of the list (respecting the offset of a sliced array and null lists) |
| 1103 | // take part in the decisions |
| 1104 | values.push_back(ValueOrStop( |
| 1105 | checked_cast<const ListArrayType&>(*chunk).Flatten(gc_memory_pool()))); |
| 1106 | } |
| 1107 | return Converter::Make(std::make_shared<ChunkedArray>(std::move(values), value_type)); |
| 1108 | } |
| 1109 | |
| 1110 | template <typename ListArrayType> |
| 1111 | class Converter_List : public Converter { |
nothing calls this directly
no test coverage detected