| 407 | }; |
| 408 | |
| 409 | int64_t RangesToLengthSum(const Array& ranges) { |
| 410 | int64_t sum = 0; |
| 411 | const StructArray& ranges_struct = checked_cast<const StructArray&>(ranges); |
| 412 | std::shared_ptr<UInt64Array> lengths = |
| 413 | checked_pointer_cast<UInt64Array>(ranges_struct.field(2)); |
| 414 | for (auto length : *lengths) { |
| 415 | sum += static_cast<int64_t>(*length); |
| 416 | } |
| 417 | return sum; |
| 418 | } |
| 419 | |
| 420 | } // namespace |
| 421 |
no test coverage detected