Class BigIntegerParquetBytesCodec

java.lang.Object
io.deephaven.parquet.base.BigIntegerParquetBytesCodec
All Implemented Interfaces:
ObjectCodec<BigInteger>, ObjectDecoder<BigInteger>

public class BigIntegerParquetBytesCodec extends Object implements ObjectCodec<BigInteger>
  • Constructor Details

    • BigIntegerParquetBytesCodec

      public BigIntegerParquetBytesCodec(int encodedSizeInBytes)
      Parameters:
      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.
    • BigIntegerParquetBytesCodec

      public BigIntegerParquetBytesCodec()
  • Method Details

    • isNullable

      public boolean isNullable()
      Description copied from interface: ObjectCodec
      Does this codec support encoding of null values?
      Specified by:
      isNullable in interface ObjectCodec<BigInteger>
      Returns:
      if null values are supported
    • getPrecision

      public int getPrecision()
      Description copied from interface: ObjectCodec
      If applicable, the maximum encodable precision. If precision is not applicable (i.e. for non-numeric types) this method should return zero.
      Specified by:
      getPrecision in interface ObjectCodec<BigInteger>
      Returns:
      the numeric precision supported by this codec
    • getScale

      public int getScale()
      Description copied from interface: ObjectCodec
      If applicable, the maximum encodable scale. If scale is not applicable (i.e. for non-numeric types) this method should return zero.
      Specified by:
      getScale in interface ObjectCodec<BigInteger>
      Returns:
      the numeric scale (digits after the decimal point) supported by this codec
    • expectedObjectWidth

      public int expectedObjectWidth()
      Description copied from interface: ObjectDecoder
      What width byte array does this ObjectCodec expect to encode and decode?
      Specified by:
      expectedObjectWidth in interface ObjectDecoder<BigInteger>
      Returns:
      VARIABLE_WIDTH_SENTINEL if the codec must encode and decode variable width columns, otherwise the fixed size of byte array that must be decoded and encoded.
    • encode

      @NotNull public @org.jetbrains.annotations.NotNull byte[] encode(@Nullable @Nullable BigInteger input)
      Description copied from interface: ObjectCodec
      Encode the specified input as an array of bytes. Note that it is up to the implementation how to encode null inputs. The use of a zero-length byte array is strongly encouraged.
      Specified by:
      encode in interface ObjectCodec<BigInteger>
      Parameters:
      input - The input object, possibly null
      Returns:
      The output byte array
    • decode

      @Nullable public @Nullable BigInteger decode(@NotNull @org.jetbrains.annotations.NotNull byte[] input, int offset, int length)
      Description copied from interface: ObjectDecoder
      Decode an object from an array of bytes.
      Specified by:
      decode in interface ObjectDecoder<BigInteger>
      Parameters:
      input - The input byte array containing bytes to decode
      offset - The offset into the byte array to start decoding from
      length - The number of bytes to decode, starting at the offset
      Returns:
      The output object, possibly null