Class Page

java.lang.Object
io.trino.spi.Page

public final class Page extends Object
  • Field Details

    • INSTANCE_SIZE

      public static final int INSTANCE_SIZE
  • Constructor Details

    • Page

      public Page(Block... blocks)
    • Page

      public Page(int positionCount)
    • Page

      public Page(int positionCount, Block... blocks)
  • Method Details

    • getInstanceSizeInBytes

      public static long getInstanceSizeInBytes(int blockCount)
    • getChannelCount

      public int getChannelCount()
    • getPositionCount

      public int getPositionCount()
    • getSizeInBytes

      public long getSizeInBytes()
    • getRetainedSizeInBytes

      public long getRetainedSizeInBytes()
    • getBlock

      public Block getBlock(int channel)
    • getSingleValuePage

      public Page getSingleValuePage(int position)
      Gets the values at the specified position as a single element page. The method creates independent copy of the data.
    • getRegion

      public Page getRegion(int positionOffset, int length)
    • appendColumn

      public Page appendColumn(Block block)
    • compact

      public void compact()
    • getLoadedPage

      public Page getLoadedPage()
      Returns a page that assures all data is in memory. May return the same page if all page data is already in memory.

      This allows streaming data sources to skip sections that are not accessed in a query.

    • getLoadedPage

      public Page getLoadedPage(int column)
    • getLoadedPage

      public Page getLoadedPage(int... columns)
    • getLoadedPage

      public Page getLoadedPage(int[] columns, int[] eagerlyLoadedColumns)
    • toString

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

      public Page getPositions(int[] retainedPositions, int offset, int length)
    • copyPositions

      public Page copyPositions(int[] retainedPositions, int offset, int length)
    • getColumns

      public Page getColumns(int column)
    • getColumns

      public Page getColumns(int... columns)
    • prependColumn

      public Page prependColumn(Block column)