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

Function FromInt32Statistics

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

Source from the content-addressed store, hash-verified

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

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