| 558 | |
| 559 | template <typename TypeClass> |
| 560 | Status CompareListView(const TypeClass& type) { |
| 561 | const ArrayData& left_values = *left_.child_data[0]; |
| 562 | const ArrayData& right_values = *right_.child_data[0]; |
| 563 | |
| 564 | using offset_type = typename TypeClass::offset_type; |
| 565 | const auto* left_offsets = left_.GetValues<offset_type>(1) + left_start_idx_; |
| 566 | const auto* right_offsets = right_.GetValues<offset_type>(1) + right_start_idx_; |
| 567 | const auto* left_sizes = left_.GetValues<offset_type>(2) + left_start_idx_; |
| 568 | const auto* right_sizes = right_.GetValues<offset_type>(2) + right_start_idx_; |
| 569 | |
| 570 | auto compare_view = [&](int64_t i, int64_t length) -> bool { |
| 571 | for (int64_t j = i; j < i + length; ++j) { |
| 572 | if (left_sizes[j] != right_sizes[j]) { |
| 573 | return false; |
| 574 | } |
| 575 | const offset_type size = left_sizes[j]; |
| 576 | if (size == 0) { |
| 577 | continue; |
| 578 | } |
| 579 | RangeDataEqualsImpl impl(options_, floating_approximate_, left_values, |
| 580 | right_values, left_offsets[j], right_offsets[j], size); |
| 581 | if (!impl.Compare()) { |
| 582 | return false; |
| 583 | } |
| 584 | } |
| 585 | return true; |
| 586 | }; |
| 587 | VisitValidRuns(std::move(compare_view)); |
| 588 | return Status::OK(); |
| 589 | } |
| 590 | |
| 591 | template <typename RunEndCType> |
| 592 | Status CompareRunEndEncoded() { |