| 238 | } |
| 239 | |
| 240 | static Status FromInt64Statistics(const Int64Statistics& statistics, |
| 241 | const LogicalType& logical_type, |
| 242 | std::shared_ptr<::arrow::Scalar>* min, |
| 243 | std::shared_ptr<::arrow::Scalar>* max) { |
| 244 | ARROW_ASSIGN_OR_RAISE(auto type, |
| 245 | FromInt64(logical_type, default_arrow_reader_properties())); |
| 246 | |
| 247 | switch (logical_type.type()) { |
| 248 | case LogicalType::Type::INT: |
| 249 | return MakeMinMaxIntegralScalar(statistics, *type, min, max); |
| 250 | case LogicalType::Type::TIME: |
| 251 | case LogicalType::Type::TIMESTAMP: |
| 252 | case LogicalType::Type::NONE: |
| 253 | return MakeMinMaxTypedScalar<int64_t>(statistics, type, min, max); |
| 254 | case LogicalType::Type::DECIMAL: |
| 255 | return ExtractDecimalMinMaxFromInteger(statistics.min(), statistics.max(), |
| 256 | logical_type, min, max); |
| 257 | default: |
| 258 | break; |
| 259 | } |
| 260 | |
| 261 | return Status::NotImplemented("Cannot extract statistics for INT64 with logical type ", |
| 262 | logical_type.ToString()); |
| 263 | } |
| 264 | |
| 265 | Status ByteArrayStatisticsAsScalars(const Statistics& statistics, |
| 266 | std::shared_ptr<::arrow::Scalar>* min, |
no test coverage detected