Class GroupByIdBlock

  • All Implemented Interfaces:
    Block

    public class GroupByIdBlock
    extends Object
    implements Block
    • Constructor Detail

      • GroupByIdBlock

        public GroupByIdBlock​(long groupCount,
                              Block block)
    • Method Detail

      • getGroupCount

        public long getGroupCount()
      • getGroupId

        public long getGroupId​(int position)
      • getRegion

        public Block getRegion​(int positionOffset,
                               int length)
        Specified by:
        getRegion in interface Block
      • getRegionSizeInBytes

        public long getRegionSizeInBytes​(int positionOffset,
                                         int length)
        Specified by:
        getRegionSizeInBytes in interface Block
      • getPositionsSizeInBytes

        public long getPositionsSizeInBytes​(boolean[] positions)
        Specified by:
        getPositionsSizeInBytes in interface Block
      • copyRegion

        public Block copyRegion​(int positionOffset,
                                int length)
        Specified by:
        copyRegion in interface Block
      • getSliceLength

        public int getSliceLength​(int position)
        Specified by:
        getSliceLength in interface Block
      • getByte

        public byte getByte​(int position,
                            int offset)
        Specified by:
        getByte in interface Block
      • getShort

        public short getShort​(int position,
                              int offset)
        Specified by:
        getShort in interface Block
      • getInt

        public int getInt​(int position,
                          int offset)
        Specified by:
        getInt in interface Block
      • getLong

        public long getLong​(int position,
                            int offset)
        Specified by:
        getLong in interface Block
      • getSlice

        public io.airlift.slice.Slice getSlice​(int position,
                                               int offset,
                                               int length)
        Specified by:
        getSlice in interface Block
      • getObject

        public <T> T getObject​(int position,
                               Class<T> clazz)
        Specified by:
        getObject in interface Block
      • bytesEqual

        public boolean bytesEqual​(int position,
                                  int offset,
                                  io.airlift.slice.Slice otherSlice,
                                  int otherOffset,
                                  int length)
        Specified by:
        bytesEqual in interface Block
      • bytesCompare

        public int bytesCompare​(int position,
                                int offset,
                                int length,
                                io.airlift.slice.Slice otherSlice,
                                int otherOffset,
                                int otherLength)
        Specified by:
        bytesCompare in interface Block
      • writeBytesTo

        public void writeBytesTo​(int position,
                                 int offset,
                                 int length,
                                 BlockBuilder blockBuilder)
        Specified by:
        writeBytesTo in interface Block
      • equals

        public boolean equals​(int position,
                              int offset,
                              Block otherBlock,
                              int otherPosition,
                              int otherOffset,
                              int length)
        Specified by:
        equals in interface Block
      • hash

        public long hash​(int position,
                         int offset,
                         int length)
        Specified by:
        hash in interface Block
      • compareTo

        public int compareTo​(int leftPosition,
                             int leftOffset,
                             int leftLength,
                             Block rightBlock,
                             int rightPosition,
                             int rightOffset,
                             int rightLength)
        Specified by:
        compareTo in interface Block
      • isNull

        public boolean isNull​(int position)
        Specified by:
        isNull in interface Block
      • getSizeInBytes

        public long getSizeInBytes()
        Specified by:
        getSizeInBytes in interface Block
      • copyPositions

        public Block copyPositions​(int[] positions,
                                   int offset,
                                   int length)
        Specified by:
        copyPositions in interface Block
      • isLoaded

        public boolean isLoaded()
        Specified by:
        isLoaded in interface Block