Class ColumnarDataBlock

  • All Implemented Interfaces:
    DataBlock

    public class ColumnarDataBlock
    extends BaseDataBlock
    Column-wise data table. It stores data in columnar-major format.
    • Field Detail

      • _cumulativeColumnOffsetSizeInBytes

        protected int[] _cumulativeColumnOffsetSizeInBytes
      • _columnSizeInBytes

        protected int[] _columnSizeInBytes
    • Constructor Detail

      • ColumnarDataBlock

        public ColumnarDataBlock()
      • ColumnarDataBlock

        public ColumnarDataBlock​(int numRows,
                                 DataSchema dataSchema,
                                 String[] stringDictionary,
                                 byte[] fixedSizeDataBytes,
                                 byte[] variableSizeDataBytes)
    • Method Detail

      • computeBlockObjectConstants

        protected void computeBlockObjectConstants()
      • getDataBlockVersionType

        protected int getDataBlockVersionType()
        Description copied from class: BaseDataBlock
        Return the int serialized form of the data block version and type.
        Specified by:
        getDataBlockVersionType in class BaseDataBlock
        Returns:
      • getOffsetInFixedBuffer

        protected int getOffsetInFixedBuffer​(int rowId,
                                             int colId)
        Description copied from class: BaseDataBlock
        return the offset in _fixedSizeDataBytes of the row/column ID.
        Specified by:
        getOffsetInFixedBuffer in class BaseDataBlock
        Parameters:
        rowId - row ID
        colId - column ID
        Returns:
        the offset in the fixed size buffer for the row/columnID.
      • positionOffsetInVariableBufferAndGetLength

        protected int positionOffsetInVariableBufferAndGetLength​(int rowId,
                                                                 int colId)
        Description copied from class: BaseDataBlock
        position the _variableSizeDataBytes to the corresponding row/column ID. and return the length of bytes to extract from the variable size buffer.
        Specified by:
        positionOffsetInVariableBufferAndGetLength in class BaseDataBlock
        Parameters:
        rowId - row ID
        colId - column ID
        Returns:
        the length to extract from variable size buffer.