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

Function FromInt32Statistics

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

Source from the content-addressed store, hash-verified

213}
214
215static 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
240static Status FromInt64Statistics(const Int64Statistics& statistics,
241 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