MCPcopy Create free account
hub / github.com/apache/arrow / FromInt64Statistics

Function FromInt64Statistics

cpp/src/parquet/arrow/reader_internal.cc:241–264  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

StatisticsAsScalarsFunction · 0.85

Calls 7

MakeMinMaxIntegralScalarFunction · 0.85
NotImplementedFunction · 0.50
typeMethod · 0.45
minMethod · 0.45
maxMethod · 0.45
ToStringMethod · 0.45

Tested by

no test coverage detected