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

Function RangeOfValuesUsedByListView

cpp/src/arrow/util/list_util.cc:137–149  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

135
136template <typename offset_type>
137std::pair<int64_t, int64_t> RangeOfValuesUsedByListView(const ArraySpan& input) {
138 DCHECK(is_list_view(*input.type));
139 if (input.length == 0 || input.null_count == input.length) {
140 return {0, 0};
141 }
142 const auto min_offset = MinViewOffset<offset_type>(input);
143 // If all list-views are empty, min_offset will be std::nullopt.
144 if (!min_offset.has_value()) {
145 return {0, 0};
146 }
147 const int64_t max_end = MaxViewEnd<offset_type>(input);
148 return {*min_offset, max_end - *min_offset};
149}
150
151template <typename offset_type>
152std::pair<int64_t, int64_t> RangeOfValuesUsedByList(const ArraySpan& input) {

Callers

nothing calls this directly

Calls 1

is_list_viewFunction · 0.50

Tested by

no test coverage detected