| 547 | |
| 548 | template <bool is_signed> |
| 549 | std::pair<ByteArray, ByteArray> GetMinMaxBinaryHelper( |
| 550 | const TypedComparatorImpl<is_signed, ByteArrayType>& comparator, |
| 551 | const ::arrow::Array& values) { |
| 552 | using Helper = CompareHelper<ByteArrayType, is_signed>; |
| 553 | |
| 554 | ByteArray min = Helper::DefaultMin(); |
| 555 | ByteArray max = Helper::DefaultMax(); |
| 556 | constexpr int type_length = -1; |
| 557 | |
| 558 | const auto valid_func = [&](ByteArray val) { |
| 559 | min = Helper::Min(type_length, val, min); |
| 560 | max = Helper::Max(type_length, val, max); |
| 561 | }; |
| 562 | const auto null_func = [&]() {}; |
| 563 | |
| 564 | if (::arrow::is_binary_like(values.type_id())) { |
| 565 | ::arrow::VisitArraySpanInline<::arrow::BinaryType>( |
| 566 | *values.data(), std::move(valid_func), std::move(null_func)); |
| 567 | } else if (::arrow::is_large_binary_like(values.type_id())) { |
| 568 | ::arrow::VisitArraySpanInline<::arrow::LargeBinaryType>( |
| 569 | *values.data(), std::move(valid_func), std::move(null_func)); |
| 570 | } else if (::arrow::is_binary_view_like(values.type_id())) { |
| 571 | ::arrow::VisitArraySpanInline<::arrow::BinaryViewType>( |
| 572 | *values.data(), std::move(valid_func), std::move(null_func)); |
| 573 | } else { |
| 574 | throw ParquetException("Only binary-like data supported"); |
| 575 | } |
| 576 | |
| 577 | return {min, max}; |
| 578 | } |
| 579 | |
| 580 | template <> |
| 581 | std::pair<ByteArray, ByteArray> TypedComparatorImpl<true, ByteArrayType>::GetMinMax( |
nothing calls this directly
no test coverage detected