Package com.illumon.iris.db.v2.parquet
Class BigDecimalParquetBytesCodec
java.lang.Object
com.illumon.iris.db.v2.parquet.BigDecimalParquetBytesCodec
- All Implemented Interfaces:
io.deephaven.util.codec.ObjectCodec<BigDecimal>
,io.deephaven.util.codec.ObjectDecoder<BigDecimal>
public class BigDecimalParquetBytesCodec
extends Object
implements io.deephaven.util.codec.ObjectCodec<BigDecimal>
-
Field Summary
Fields inherited from interface io.deephaven.util.codec.ObjectDecoder
VARIABLE_WIDTH_SENTINEL
-
Constructor Summary
ConstructorsConstructorDescriptionBigDecimalParquetBytesCodec
(int precision, int scale, int encodedSizeInBytes) BigDecimalParquetBytesCodec
(int precision, int scale, int encodedSizeInBytes, RoundingMode roundingMode) -
Method Summary
Modifier and TypeMethodDescriptiondecode
(byte[] input, int offset, int length) byte[]
encode
(BigDecimal input) int
int
int
getScale()
boolean
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.deephaven.util.codec.ObjectDecoder
checkWidth, decode
-
Constructor Details
-
BigDecimalParquetBytesCodec
public BigDecimalParquetBytesCodec(int precision, int scale, int encodedSizeInBytes, RoundingMode roundingMode) - Parameters:
precision
-scale
-encodedSizeInBytes
- encoded size in bytes, if fixed size, or -1 if variable size. note that according to the parquet spec, the minimum number of bytes required to represent the unscaled value should be used for a variable sized (binary) encoding; in any case, the maximum encoded bytes is implicitly limited by precision.
-
BigDecimalParquetBytesCodec
public BigDecimalParquetBytesCodec(int precision, int scale, int encodedSizeInBytes)
-
-
Method Details
-
isNullable
public boolean isNullable()- Specified by:
isNullable
in interfaceio.deephaven.util.codec.ObjectCodec<BigDecimal>
-
getPrecision
public int getPrecision()- Specified by:
getPrecision
in interfaceio.deephaven.util.codec.ObjectCodec<BigDecimal>
-
getScale
public int getScale()- Specified by:
getScale
in interfaceio.deephaven.util.codec.ObjectCodec<BigDecimal>
-
encode
- Specified by:
encode
in interfaceio.deephaven.util.codec.ObjectCodec<BigDecimal>
-
decode
- Specified by:
decode
in interfaceio.deephaven.util.codec.ObjectDecoder<BigDecimal>
-
expectedObjectWidth
public int expectedObjectWidth()- Specified by:
expectedObjectWidth
in interfaceio.deephaven.util.codec.ObjectDecoder<BigDecimal>
-