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

Function ExtractDecimalMinMaxFromInteger

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

Source from the content-addressed store, hash-verified

152
153template <typename Int>
154Status ExtractDecimalMinMaxFromInteger(Int min_value, Int max_value,
155 const LogicalType& logical_type,
156 std::shared_ptr<::arrow::Scalar>* min,
157 std::shared_ptr<::arrow::Scalar>* max) {
158 static_assert(std::is_integral_v<Int>);
159 const Int min_be = ToBigEndian(min_value);
160 const Int max_be = ToBigEndian(max_value);
161 const auto min_bytes =
162 std::string_view(reinterpret_cast<const char*>(&min_be), sizeof(min_be));
163 const auto max_bytes =
164 std::string_view(reinterpret_cast<const char*>(&max_be), sizeof(max_be));
165 return ExtractDecimalMinMaxFromBytes(min_bytes, max_bytes, logical_type, min, max);
166}
167
168template <typename CType, typename StatisticsType>
169Status MakeMinMaxScalar(const StatisticsType& statistics,

Callers 2

FromInt32StatisticsFunction · 0.85
FromInt64StatisticsFunction · 0.85

Calls 2

ToBigEndianFunction · 0.50

Tested by

no test coverage detected