MCPcopy Create free account
hub / github.com/questdb/questdb / validateScale

Method validateScale

core/src/main/java/io/questdb/std/Decimal128.java:1348–1353  ·  view source on GitHub ↗

Validates that the scale is within allowed bounds

(int scale)

Source from the content-addressed store, hash-verified

1346 * Validates that the scale is within allowed bounds
1347 */
1348 private static void validateScale(int scale) {
1349 // Use unsigned comparison for faster bounds check
1350 if (Integer.compareUnsigned(scale, MAX_SCALE) > 0) {
1351 throw NumericException.instance().put("Scale must be between 0 and " + MAX_SCALE + ", got: " + scale);
1352 }
1353 }
1354
1355 private int compareTo0(long otherHi, long otherLo) {
1356 return compare(high, low, otherHi, otherLo);

Callers 8

Decimal128Method · 0.95
fromBigDecimalMethod · 0.95
fromDoubleMethod · 0.95
fromLongMethod · 0.95
divideMethod · 0.95
ofLongMethod · 0.95
rescaleMethod · 0.95
roundMethod · 0.95

Calls 3

instanceMethod · 0.95
compareUnsignedMethod · 0.80
putMethod · 0.65

Tested by

no test coverage detected