| 152 | |
| 153 | template <typename Int> |
| 154 | Status ExtractDecimalMinMaxFromInteger(Int min_value, Int max_value, |
| 155 | const LogicalType& logical_type, |
| 156 | std::shared_ptr<::arrow::Scalar>* min, |
| 157 | std::shared_ptr<::arrow::Scalar>* max) { |
| 158 | static_assert(std::is_integral_v<Int>); |
| 159 | const Int min_be = ToBigEndian(min_value); |
| 160 | const Int max_be = ToBigEndian(max_value); |
| 161 | const auto min_bytes = |
| 162 | std::string_view(reinterpret_cast<const char*>(&min_be), sizeof(min_be)); |
| 163 | const auto max_bytes = |
| 164 | std::string_view(reinterpret_cast<const char*>(&max_be), sizeof(max_be)); |
| 165 | return ExtractDecimalMinMaxFromBytes(min_bytes, max_bytes, logical_type, min, max); |
| 166 | } |
| 167 | |
| 168 | template <typename CType, typename StatisticsType> |
| 169 | Status MakeMinMaxScalar(const StatisticsType& statistics, |
no test coverage detected