Package io.trino.type
Class DecimalOperators
java.lang.Object
io.trino.type.DecimalOperators
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final SqlScalarFunctionstatic final SqlScalarFunctionstatic final SqlScalarFunctionstatic final SqlScalarFunctionstatic final SqlScalarFunction -
Method Summary
Modifier and TypeMethodDescriptionstatic Int128addLongLongLong(Int128 a, Int128 b, int rescale, boolean left) static Int128addLongShortLong(Int128 a, long b, int rescale, boolean rescaleLeft) static Int128addShortLongLong(long a, Int128 b, int rescale, boolean left) static Int128addShortShortLong(long a, long b, int rescale, boolean left) static longaddShortShortShort(long a, long b, long aRescale, long bRescale) static Int128divideLongLongLong(Int128 dividend, Int128 divisor, int rescaleFactor) static Int128divideLongShortLong(Int128 dividend, long divisor, int rescaleFactor) static longdivideLongShortShort(Int128 dividend, long divisor, int rescaleFactor) static Int128divideShortLongLong(long dividend, Int128 divisor, int rescaleFactor) static longdivideShortLongShort(long dividend, Int128 divisor, int rescaleFactor) static Int128divideShortShortLong(long dividend, long divisor, int rescaleFactor) static longdivideShortShortShort(long dividend, long divisor, int rescaleFactor) static Int128modulusLongLongLong(Int128 dividend, Int128 divisor, int dividendRescaleFactor, int divisorRescaleFactor) static Int128modulusLongShortLong(Int128 dividend, long divisor, int dividendRescaleFactor, int divisorRescaleFactor) static longmodulusLongShortShort(Int128 dividend, long divisor, int dividendRescaleFactor, int divisorRescaleFactor) static SqlScalarFunctionstatic Int128modulusShortLongLong(long dividend, Int128 divisor, int dividendRescaleFactor, int divisorRescaleFactor) static longmodulusShortLongShort(long dividend, Int128 divisor, int dividendRescaleFactor, int divisorRescaleFactor) static longmodulusShortShortShort(long dividend, long divisor, int dividendRescaleFactor, int divisorRescaleFactor) static Int128multiplyLongLongLong(Int128 a, Int128 b) static Int128multiplyLongShortLong(Int128 a, long b) static Int128multiplyShortLongLong(long a, Int128 b) static Int128multiplyShortShortLong(long a, long b) static longmultiplyShortShortShort(long a, long b) static Int128subtractLongLongLong(Int128 a, Int128 b, int rescale, boolean left) static Int128subtractLongShortLong(Int128 a, long b, int rescale, boolean left) static Int128subtractShortLongLong(long a, Int128 b, int rescale, boolean left) static Int128subtractShortShortLong(long a, long b, int rescale, boolean left) static longsubtractShortShortShort(long a, long b, long aRescale, long bRescale)
-
Field Details
-
DECIMAL_ADD_OPERATOR
-
DECIMAL_SUBTRACT_OPERATOR
-
DECIMAL_MULTIPLY_OPERATOR
-
DECIMAL_DIVIDE_OPERATOR
-
DECIMAL_MODULUS_OPERATOR
-
-
Method Details
-
addShortShortShort
public static long addShortShortShort(long a, long b, long aRescale, long bRescale) -
addShortShortLong
-
addLongLongLong
-
addShortLongLong
-
addLongShortLong
-
subtractShortShortShort
public static long subtractShortShortShort(long a, long b, long aRescale, long bRescale) -
subtractShortShortLong
-
subtractLongLongLong
-
subtractShortLongLong
-
subtractLongShortLong
-
multiplyShortShortShort
public static long multiplyShortShortShort(long a, long b) -
multiplyShortShortLong
-
multiplyLongLongLong
-
multiplyShortLongLong
-
multiplyLongShortLong
-
divideShortShortShort
public static long divideShortShortShort(long dividend, long divisor, int rescaleFactor) -
divideShortLongShort
-
divideLongShortShort
-
divideShortShortLong
-
divideLongLongLong
-
divideShortLongLong
-
divideLongShortLong
-
modulusScalarFunction
-
modulusShortShortShort
public static long modulusShortShortShort(long dividend, long divisor, int dividendRescaleFactor, int divisorRescaleFactor) -
modulusShortLongShort
public static long modulusShortLongShort(long dividend, Int128 divisor, int dividendRescaleFactor, int divisorRescaleFactor) -
modulusLongShortShort
public static long modulusLongShortShort(Int128 dividend, long divisor, int dividendRescaleFactor, int divisorRescaleFactor) -
modulusShortLongLong
-
modulusLongShortLong
-
modulusLongLongLong
-