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

Method FitsInPrecision

cpp/src/arrow/util/basic_decimal.cc:264–271  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

262}
263
264bool BasicDecimal32::FitsInPrecision(int32_t precision) const {
265 DCHECK_GE(precision, 0);
266 DCHECK_LE(precision, kMaxPrecision);
267 if (value_ == INT32_MIN) {
268 return false;
269 }
270 return Abs(*this) < DecimalTraits<BasicDecimal32>::powers_of_ten()[precision];
271}
272
273bool BasicDecimal64::FitsInPrecision(int32_t precision) const {
274 DCHECK_GE(precision, 0);

Callers 12

VisitMethod · 0.80
MoveSingleCellImplMethod · 0.80
ValidateDecimalsMethod · 0.80
FromPositiveRealMethod · 0.80
TESTFunction · 0.80
TestNumericLimitMethod · 0.80
TYPED_TESTFunction · 0.80
CallMethod · 0.80
CallMethod · 0.80
CallMethod · 0.80
CallMethod · 0.80
CallMethod · 0.80

Calls 1

AbsFunction · 0.70

Tested by 3

TESTFunction · 0.64
TestNumericLimitMethod · 0.64
TYPED_TESTFunction · 0.64