| 602 | |
| 603 | template <bool is_signed> |
| 604 | std::pair<ByteArray, ByteArray> GetMinMaxBinaryHelper( |
| 605 | const TypedComparatorImpl<is_signed, ByteArrayType>& comparator, |
| 606 | const ::arrow::Array& values) { |
| 607 | using Helper = CompareHelper<ByteArrayType, is_signed>; |
| 608 | |
| 609 | ByteArray min = Helper::DefaultMin(); |
| 610 | ByteArray max = Helper::DefaultMax(); |
| 611 | constexpr int type_length = -1; |
| 612 | |
| 613 | const auto valid_func = [&](ByteArray val) { |
| 614 | min = Helper::Min(type_length, val, min); |
| 615 | max = Helper::Max(type_length, val, max); |
| 616 | }; |
| 617 | const auto null_func = [&]() {}; |
| 618 | |
| 619 | if (::arrow::is_binary_like(values.type_id())) { |
| 620 | ::arrow::VisitArraySpanInline<::arrow::BinaryType>( |
| 621 | *values.data(), std::move(valid_func), std::move(null_func)); |
| 622 | } else if (::arrow::is_large_binary_like(values.type_id())) { |
| 623 | ::arrow::VisitArraySpanInline<::arrow::LargeBinaryType>( |
| 624 | *values.data(), std::move(valid_func), std::move(null_func)); |
| 625 | } else if (::arrow::is_binary_view_like(values.type_id())) { |
| 626 | ::arrow::VisitArraySpanInline<::arrow::BinaryViewType>( |
| 627 | *values.data(), std::move(valid_func), std::move(null_func)); |
| 628 | } else { |
| 629 | throw ParquetException("Only binary-like data supported"); |
| 630 | } |
| 631 | |
| 632 | return {min, max}; |
| 633 | } |
| 634 | |
| 635 | template <> |
| 636 | std::pair<ByteArray, ByteArray> TypedComparatorImpl<true, ByteArrayType>::GetMinMax( |
nothing calls this directly
no test coverage detected