Package com.illumon.iris.db.tables.utils
Class BigDecimalUtils
java.lang.Object
com.illumon.iris.db.tables.utils.BigDecimalUtils
Utilities to support BigDecimal exhaust.
Parquet decimal types make a whole column decimal type have a fixed precision and scale; BigDecimal columns
in Deephaven are, each value, arbitrary precision (its own precision and scale).
For static tables, it is possible to compute overall precision and scale values that fit every existing value. For
refreshing tables, we need the user to tell us.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Immutable way to store and pass precision and scale values. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncomputePrecisionAndScale
(Table t, String colName) Compute an overall precision and scale that would fit all existing values in a table.computePrecisionAndScale
(ReadOnlyIndex rowSet, ColumnSource<BigDecimal> source) Compute an overall precision and scale that would fit all existing values in a column source.
-
Constructor Details
-
BigDecimalUtils
public BigDecimalUtils()
-
-
Method Details
-
computePrecisionAndScale
Compute an overall precision and scale that would fit all existing values in a table.- Parameters:
t
- a Deephaven tablecolName
- a Column fort
, which should be ofBigDecimal
type- Returns:
- a
PrecisionAndScale
object result.
-
computePrecisionAndScale
public static BigDecimalUtils.PrecisionAndScale computePrecisionAndScale(@NotNull ReadOnlyIndex rowSet, @NotNull ColumnSource<BigDecimal> source) Compute an overall precision and scale that would fit all existing values in a column source.- Parameters:
rowSet
- The rowset for the provided columnsource
- aColumnSource
ofBigDecimal
type- Returns:
- a
PrecisionAndScale
object result.
-