Class DoubleNullToZeroColumnSource

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

public class DoubleNullToZeroColumnSource extends AbstractColumnSource<Double> implements MutableColumnSourceGetDefaults.ForDouble
If you want to expose the internal state of an aggregation and compare it, then the new tables might have nulls where the old tables have zero. This wrapper prevents that spurious comparison failure.
  • Method Details

    • startTrackingPrevValues

      public void startTrackingPrevValues()
      Description copied from interface: ColumnSource
      ColumnSource implementations that track previous values have the option to not actually start tracking previous values until this method is called. This is an option, not an obligation: some simple ColumnSource implementations (like TSingleValueSource for various T) always track previous values; other implementations (like PrevColumnSource) never do; some (like TArrayColumnSource) only start tracking once this method is called. An immutable column source can not have distinct prev values; therefore it is implemented as a no-op.
      Specified by:
      startTrackingPrevValues in interface ColumnSource<Double>
    • 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<Double>
      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
    • 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<Double>
      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