| 213 | } |
| 214 | |
| 215 | static Status FromInt32Statistics(const Int32Statistics& statistics, |
| 216 | const LogicalType& logical_type, |
| 217 | std::shared_ptr<::arrow::Scalar>* min, |
| 218 | std::shared_ptr<::arrow::Scalar>* max) { |
| 219 | ARROW_ASSIGN_OR_RAISE(auto type, |
| 220 | FromInt32(logical_type, default_arrow_reader_properties())); |
| 221 | |
| 222 | switch (logical_type.type()) { |
| 223 | case LogicalType::Type::INT: |
| 224 | return MakeMinMaxIntegralScalar(statistics, *type, min, max); |
| 225 | case LogicalType::Type::DATE: |
| 226 | case LogicalType::Type::TIME: |
| 227 | case LogicalType::Type::NONE: |
| 228 | return MakeMinMaxTypedScalar<int32_t>(statistics, type, min, max); |
| 229 | case LogicalType::Type::DECIMAL: |
| 230 | return ExtractDecimalMinMaxFromInteger(statistics.min(), statistics.max(), |
| 231 | logical_type, min, max); |
| 232 | default: |
| 233 | break; |
| 234 | } |
| 235 | |
| 236 | return Status::NotImplemented("Cannot extract statistics for INT32 with logical type ", |
| 237 | logical_type.ToString()); |
| 238 | } |
| 239 | |
| 240 | static Status FromInt64Statistics(const Int64Statistics& statistics, |
| 241 | const LogicalType& logical_type, |
no test coverage detected