Class RowPositionColumnSource

java.lang.Object
io.deephaven.engine.table.impl.AbstractColumnSource<Long>
io.deephaven.engine.table.impl.sources.RowPositionColumnSource
All Implemented Interfaces:
ChunkSource<Values>, ChunkSource.WithPrev<Values>, ColumnSource<Long>, ElementSource<Long>, FillContextMaker, GetContextMaker, ColumnSourceGetDefaults.ForLong, ColumnSourceGetDefaults.LongBacked<Long>, DefaultChunkSource<Values>, DefaultChunkSource.WithPrev<Values>, MutableColumnSource<Long>, MutableColumnSourceGetDefaults.ForLong, MutableColumnSourceGetDefaults.LongBacked<Long>, Releasable, TupleExporter<Long>, TupleSource<Long>

public class RowPositionColumnSource extends AbstractColumnSource<Long> implements MutableColumnSourceGetDefaults.ForLong
This is a column source that uses no additional memory and maps from row key to row position in the supplied row set.
  • Constructor Details

    • RowPositionColumnSource

      public RowPositionColumnSource(TrackingRowSet rowSet)
  • Method Details

    • getLong

      public long getLong(long rowKey)
      Description copied from interface: ElementSource
      Get the value at the rowKey as a long. RowKeys that are not present are undefined.
      Specified by:
      getLong in interface ElementSource<Long>
      Parameters:
      rowKey - the location in key space to get the value from.
      Returns:
      the long at the rowKey, null values are represented by QueryConstants.NULL_LONG
    • getPrevLong

      public long getPrevLong(long rowKey)
      Description copied from interface: ElementSource
      Get the previous value at the rowKey as a long. See ElementSource.getPrev(long) for more details.
      Specified by:
      getPrevLong in interface ElementSource<Long>
      Parameters:
      rowKey - the location in key space to get the previous value from.
      Returns:
      the previous long at the rowKey, null values are represented by QueryConstants.NULL_LONG
    • fillChunk

      public void fillChunk(@NotNull @NotNull ChunkSource.FillContext context, @NotNull @NotNull WritableChunk<? super Values> destination, @NotNull @NotNull RowSequence rowSequence)
      Description copied from interface: ChunkSource
      Populates the given destination chunk with data corresponding to the keys from the given RowSequence.
      Specified by:
      fillChunk in interface ChunkSource<Values>
      Overrides:
      fillChunk in class AbstractColumnSource<Long>
      Parameters:
      context - A context containing all mutable/state related data used in retrieving the Chunk.
      destination - The chunk to be populated according to rowSequence. No assumptions shall be made about the size of the chunk shall be made. The chunk will be populated from position [0,rowSequence.size()).
      rowSequence - An RowSequence representing the keys to be fetched
    • fillPrevChunk

      public void fillPrevChunk(@NotNull @NotNull ChunkSource.FillContext context, @NotNull @NotNull WritableChunk<? super Values> destination, @NotNull @NotNull RowSequence rowSequence)
      Description copied from interface: ChunkSource.WithPrev
      Populates the given destination chunk with data corresponding to the keys from the given RowSequence.
      Specified by:
      fillPrevChunk in interface ChunkSource.WithPrev<Values>
      Overrides:
      fillPrevChunk in class AbstractColumnSource<Long>
      Parameters:
      context - A context containing all mutable/state related data used in retrieving the Chunk.
      destination - The chunk to be populated according to rowSequence. No assumptions shall be made about the size of the chunk shall be made. The chunk will be populated from position [0,rowSequence.size()).
      rowSequence - An RowSequence representing the keys to be fetched