Class RowDataBlock

  • All Implemented Interfaces:
    DataBlock

    public class RowDataBlock
    extends BaseDataBlock
    Wrapper for row-wise data table. It stores data in row-major format.
    • Field Detail

      • _columnOffsets

        protected int[] _columnOffsets
      • _rowSizeInBytes

        protected int _rowSizeInBytes
    • Constructor Detail

      • RowDataBlock

        public RowDataBlock()
      • RowDataBlock

        public RowDataBlock​(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.
      • toMetadataOnlyDataTable

        public RowDataBlock toMetadataOnlyDataTable()
      • toDataOnlyDataTable

        public RowDataBlock toDataOnlyDataTable()
      • getRowSizeInBytes

        public int getRowSizeInBytes()