presto-spi/src/main/java/io/prestosql/spi/type/UnscaledDecimal128Arithmetic.java/UnscaledDecimal128Arithmetic/digitsInIntegerBase
class UnscaledDecimal128Arithmetic:    private static int digitsInIntegerBase(int[] digits)
    {
        int length = digits.length;
        while (length > 0 && digits[length - 1] == 0) {
            length--;
        }
        return length;
    }