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

Function FromInt64Statistics

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

Source from the content-addressed store, hash-verified

238}
239
240static 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
265Status ByteArrayStatisticsAsScalars(const Statistics& statistics,
266 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