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

Method rescale

core/src/main/java/io/questdb/std/Decimal256.java:1635–1646  ·  view source on GitHub ↗

Rescale this Decimal256 in place @param newScale The new scale (must be >= current scale)

(int newScale)

Source from the content-addressed store, hash-verified

1633 * @param newScale The new scale (must be >= current scale)
1634 */
1635 public void rescale(int newScale) {
1636 if (isNull()) {
1637 return;
1638 }
1639
1640 if (newScale < scale) {
1641 round(newScale, RoundingMode.UNNECESSARY);
1642 return;
1643 }
1644
1645 rescale0(newScale);
1646 }
1647
1648 /**
1649 * Round to specified scale.

Callers 15

testDecimalCastMethod · 0.95
testRescale128Method · 0.95
testRescale192Method · 0.95
testRescale256Method · 0.95
testRescale64Method · 0.95
testRescaleLessMethod · 0.95
testRescaleLessFailsMethod · 0.95
testRescaleLessFails2Method · 0.95
testRescaleMoreMethod · 0.95
testRescaleNegativeMethod · 0.95
testRescaleNullMethod · 0.95

Calls 3

isNullMethod · 0.95
roundMethod · 0.95
rescale0Method · 0.95

Tested by 15

testDecimalCastMethod · 0.76
testRescale128Method · 0.76
testRescale192Method · 0.76
testRescale256Method · 0.76
testRescale64Method · 0.76
testRescaleLessMethod · 0.76
testRescaleLessFailsMethod · 0.76
testRescaleLessFails2Method · 0.76
testRescaleMoreMethod · 0.76
testRescaleNegativeMethod · 0.76
testRescaleNullMethod · 0.76