| 193 | } // namespace |
| 194 | |
| 195 | Result<std::pair<int64_t, int64_t>> RangeOfValuesUsed(const ArraySpan& input) { |
| 196 | switch (input.type->id()) { |
| 197 | case Type::LIST: |
| 198 | return RangeOfValuesUsedByList<ListType::offset_type>(input); |
| 199 | case Type::MAP: |
| 200 | return RangeOfValuesUsedByList<MapType::offset_type>(input); |
| 201 | case Type::LARGE_LIST: |
| 202 | return RangeOfValuesUsedByList<LargeListType::offset_type>(input); |
| 203 | case Type::LIST_VIEW: |
| 204 | return RangeOfValuesUsedByListView<ListViewType::offset_type>(input); |
| 205 | case Type::LARGE_LIST_VIEW: |
| 206 | return RangeOfValuesUsedByListView<LargeListViewType::offset_type>(input); |
| 207 | default: |
| 208 | break; |
| 209 | } |
| 210 | DCHECK(!is_var_length_list_like(*input.type)); |
| 211 | return Status::TypeError( |
| 212 | "RangeOfValuesUsed: input is not a var-length list-like array"); |
| 213 | } |
| 214 | |
| 215 | Result<int64_t> SumOfLogicalListSizes(const ArraySpan& input) { |
| 216 | switch (input.type->id()) { |