Class Formula

java.lang.Object
io.deephaven.engine.table.impl.select.Formula
All Implemented Interfaces:
ElementSource
Direct Known Subclasses:
FormulaKernelAdapter

public abstract class Formula extends Object implements ElementSource
The Formula class is used within a FormulaColumn to compute individual table cell values.
  • Field Details

  • Constructor Details

  • Method Details

    • getRowSet

      public TrackingRowSet getRowSet()
    • getPrev

      public abstract Object getPrev(long rowKey)
      Description copied from interface: ElementSource
      Get the previous value at the rowKey. Previous values are used during an UG update cycle to process changes in data. During normal operation previous values will be identical to current values. RowKeys that were not present are undefined.
      Specified by:
      getPrev in interface ElementSource
      Parameters:
      rowKey - the location in key space to get the value from.
      Returns:
      the previous value at the rowKey, potentially null.
    • get

      public abstract Object get(long rowKey)
      Description copied from interface: ElementSource
      Get the value from the source. This may return boxed values for basic types. RowKeys that are not present are undefined.
      Specified by:
      get in interface ElementSource
      Parameters:
      rowKey - the location in key space to get the value from.
      Returns:
      the value at the rowKey, potentially null.
    • getBoolean

      public Boolean getBoolean(long rowKey)
      Description copied from interface: ElementSource
      Get the value at the rowKey as a Boolean. RowKeys that are not present are undefined.
      Specified by:
      getBoolean in interface ElementSource
      Parameters:
      rowKey - the location in key space to get the value from.
      Returns:
      the boolean at the rowKey, potentially null.
    • getByte

      public byte getByte(long rowKey)
      Description copied from interface: ElementSource
      Get the value at the rowKey as a byte. RowKeys that are not present are undefined.
      Specified by:
      getByte in interface ElementSource
      Parameters:
      rowKey - the location in key space to get the value from.
      Returns:
      the boolean at the rowKey, null values are represented by QueryConstants.NULL_BYTE
    • getChar

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

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

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

      public int getInt(long rowKey)
      Description copied from interface: ElementSource
      Get the value at the rowKey as an int. RowKeys that are not present are undefined.
      Specified by:
      getInt in interface ElementSource
      Parameters:
      rowKey - the location in key space to get the value from.
      Returns:
      the int at the rowKey, null values are represented by QueryConstants.NULL_INT
    • 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
      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
    • getShort

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

      public Boolean getPrevBoolean(long rowKey)
      Description copied from interface: ElementSource
      Get the previous value at the rowKey as a Boolean. See ElementSource.getPrev(long) for more details. RowKeys that were not present are undefined.
      Specified by:
      getPrevBoolean in interface ElementSource
      Parameters:
      rowKey - the location in key space to get the previous value from.
      Returns:
      the previous boolean at the rowKey, potentially null.
    • getPrevByte

      public byte getPrevByte(long rowKey)
      Description copied from interface: ElementSource
      Get the previous value at the rowKey as a byte. See ElementSource.getPrev(long) for more details. RowKeys that were not present are undefined.
      Specified by:
      getPrevByte in interface ElementSource
      Parameters:
      rowKey - the location in key space to get the previous value from.
      Returns:
      the previous boolean at the rowKey, null values are represented by QueryConstants.NULL_BYTE
    • getPrevChar

      public char getPrevChar(long rowKey)
      Description copied from interface: ElementSource
      Get the previous value at the rowKey as a char. See ElementSource.getPrev(long) for more details. RowKeys that were not present are undefined.
      Specified by:
      getPrevChar in interface ElementSource
      Parameters:
      rowKey - ohe location in key space to get the previous value from.
      Returns:
      the previous char at the rowKey, null values are represented by QueryConstants.NULL_CHAR
    • getPrevDouble

      public double getPrevDouble(long rowKey)
      Description copied from interface: ElementSource
      Get the previous value at the rowKey as a double. See ElementSource.getPrev(long) for more details. RowKeys that were not present are undefined.
      Specified by:
      getPrevDouble in interface ElementSource
      Parameters:
      rowKey - the location in key space to get the previous value from.
      Returns:
      the previous double at the rowKey, null values are represented by QueryConstants.NULL_DOUBLE
    • getPrevFloat

      public float getPrevFloat(long rowKey)
      Description copied from interface: ElementSource
      Get the previous value at the rowKey as a float. See ElementSource.getPrev(long) for more details. RowKeys that were not present are undefined.
      Specified by:
      getPrevFloat in interface ElementSource
      Parameters:
      rowKey - the location in key space to get the previous value from.
      Returns:
      the previous float at the rowKey, null values are represented by QueryConstants.NULL_FLOAT
    • getPrevInt

      public int getPrevInt(long rowKey)
      Description copied from interface: ElementSource
      Get the previous value at the rowKey as an int. See ElementSource.getPrev(long) for more details. RowKeys that were not present are undefined.
      Specified by:
      getPrevInt in interface ElementSource
      Parameters:
      rowKey - the location in key space to get the previous value from.
      Returns:
      the previous int at the rowKey, null values are represented by QueryConstants.NULL_INT
    • 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
      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
    • getPrevShort

      public short getPrevShort(long rowKey)
      Description copied from interface: ElementSource
      Get the previous value at the rowKey as a short. See ElementSource.getPrev(long) for more details. RowKeys that were not present are undefined.
      Specified by:
      getPrevShort in interface ElementSource
      Parameters:
      rowKey - the location in key space to get the previous value from.
      Returns:
      the previous short at the rowKey, null values are represented by QueryConstants.NULL_SHORT
    • makeGetContext

      public Formula.GetContext makeGetContext(int chunkCapacity)
    • makeFillContext

      public abstract Formula.FillContext makeFillContext(int chunkCapacity)
    • getChunk

      public Chunk<Values> getChunk(@NotNull @NotNull Formula.GetContext context, @NotNull @NotNull RowSequence rowSequence)
    • getPrevChunk

      public Chunk<Values> getPrevChunk(@NotNull @NotNull Formula.GetContext context, @NotNull @NotNull RowSequence rowSequence)
    • fillChunk

      public abstract void fillChunk(@NotNull @NotNull Formula.FillContext context, @NotNull @NotNull WritableChunk<? super Values> destination, @NotNull @NotNull RowSequence rowSequence)
    • fillPrevChunk

      public abstract void fillPrevChunk(@NotNull @NotNull Formula.FillContext context, @NotNull @NotNull WritableChunk<? super Values> destination, @NotNull @NotNull RowSequence rowSequence)
    • getChunkType

      protected abstract ChunkType getChunkType()