Interface FixedWidthType

All Superinterfaces:
Type
All Known Implementing Classes:
AbstractIntType, AbstractLongType, BigintType, BooleanType, DateType, DecimalType, DoubleType, IntegerType, RealType, SmallintType, TimestampType, TimestampWithTimeZoneType, TimeType, TimeWithTimeZoneType, TinyintType, UuidType

public interface FixedWidthType extends Type
FixedWidthType is a type that has a fixed size for every value.
  • Method Details

    • getFixedSize

      int getFixedSize()
      Gets the size of a value of this type in bytes. All values of a FixedWidthType are the same size.
    • createBlockBuilder

      default BlockBuilder createBlockBuilder(BlockBuilderStatus blockBuilderStatus, int expectedEntries, int expectedBytesPerEntry)
      Description copied from interface: Type
      Creates the preferred block builder for this type. This is the builder used to store values after an expression projection within the query.
      Specified by:
      createBlockBuilder in interface Type
    • createFixedSizeBlockBuilder

      BlockBuilder createFixedSizeBlockBuilder(int positionCount)
      Creates a block builder for this type sized to hold the specified number of positions.
    • isFlatVariableWidth

      default boolean isFlatVariableWidth()
      Description copied from interface: Type
      Returns true if this type is variable width when written to a flat buffer.
      Specified by:
      isFlatVariableWidth in interface Type
    • getFlatVariableWidthSize

      default int getFlatVariableWidthSize(Block block, int position)
      Description copied from interface: Type
      Returns the variable width size of the value at the specified position when written to a flat buffer.
      Specified by:
      getFlatVariableWidthSize in interface Type
    • relocateFlatVariableWidthOffsets

      default int relocateFlatVariableWidthOffsets(byte[] fixedSizeSlice, int fixedSizeOffset, byte[] variableSizeSlice, int variableSizeOffset)
      Description copied from interface: Type
      Update the variable width offsets recorded in the value. This method is called after the value has been moved to a new location, and therefore the offsets need to be updated. Returns the length of the variable width data, so container types can update their offsets.
      Specified by:
      relocateFlatVariableWidthOffsets in interface Type
      Returns:
      the length of the variable width data