Class GroupByIdBlock

java.lang.Object
io.trino.operator.GroupByIdBlock
All Implemented Interfaces:
Block

public class GroupByIdBlock extends Object implements Block
  • Constructor Details

    • GroupByIdBlock

      public GroupByIdBlock(long groupCount, Block block)
  • Method Details

    • 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
    • fixedSizeInBytesPerPosition

      public OptionalInt fixedSizeInBytesPerPosition()
      Specified by:
      fixedSizeInBytesPerPosition in interface Block
    • getPositionsSizeInBytes

      public long getPositionsSizeInBytes(boolean[] positions, int selectedPositionCount)
      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
    • getSingleValueBlock

      public Block getSingleValueBlock(int position)
      Specified by:
      getSingleValueBlock in interface Block
    • mayHaveNull

      public boolean mayHaveNull()
      Specified by:
      mayHaveNull in interface Block
    • isNull

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

      public int getPositionCount()
      Specified by:
      getPositionCount in interface Block
    • getSizeInBytes

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

      public long getRetainedSizeInBytes()
      Specified by:
      getRetainedSizeInBytes in interface Block
    • getEstimatedDataSizeForStats

      public long getEstimatedDataSizeForStats(int position)
      Specified by:
      getEstimatedDataSizeForStats in interface Block
    • retainedBytesForEachPart

      public void retainedBytesForEachPart(ObjLongConsumer<Object> consumer)
      Specified by:
      retainedBytesForEachPart in interface Block
    • getEncodingName

      public String getEncodingName()
      Specified by:
      getEncodingName in interface Block
    • copyPositions

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

      public Block copyWithAppendedNull()
      Specified by:
      copyWithAppendedNull in interface Block
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • isLoaded

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

      public Block getLoadedBlock()
      Specified by:
      getLoadedBlock in interface Block
    • getChildren

      public final List<Block> getChildren()
      Specified by:
      getChildren in interface Block