Package com.illumon.iris.db.v2.sources
Class DoubleNullToZeroColumnSource
java.lang.Object
com.illumon.iris.db.v2.sources.AbstractColumnSource<Double>
com.illumon.iris.db.v2.sources.DoubleNullToZeroColumnSource
- All Implemented Interfaces:
ChunkSource<Attributes.Values>,ChunkSource.WithPrev<Attributes.Values>,DefaultChunkSource<Attributes.Values>,DefaultChunkSource.WithPrev<Attributes.Values>,FillContextMaker,GetContextMaker,ColumnSource<Double>,ColumnSourceGetDefaults.ForDouble,ElementSource<Double>,MutableColumnSource<Double>,MutableColumnSourceGetDefaults.ForDouble,Releasable,TupleExporter<Double>,TupleSource<Double>,Serializable
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.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.illumon.iris.db.v2.sources.AbstractColumnSource
AbstractColumnSource.DefaultedImmutable<DATA_TYPE>, AbstractColumnSource.DefaultedMutable<DATA_TYPE>, AbstractColumnSource.IsSerializableNested classes/interfaces inherited from interface com.illumon.iris.db.v2.sources.chunk.ChunkSource
ChunkSource.FillContext, ChunkSource.GetContext, ChunkSource.WithPrev<ATTR extends Attributes.Any>Nested classes/interfaces inherited from interface com.illumon.iris.db.v2.sources.chunk.DefaultChunkSource
DefaultChunkSource.SupportsContiguousGet<ATTR extends Attributes.Any>, DefaultChunkSource.WithPrev<ATTR extends Attributes.Any> -
Field Summary
Fields inherited from class com.illumon.iris.db.v2.sources.AbstractColumnSource
componentType, typeFields inherited from interface com.illumon.iris.db.v2.sources.chunk.ChunkSource
DEFAULT_FILL_INSTANCE, ZERO_LENGTH_CHUNK_SOURCE_ARRAYFields inherited from interface com.illumon.iris.db.v2.sources.chunk.ChunkSource.WithPrev
ZERO_LENGTH_CHUNK_SOURCE_WITH_PREV_ARRAYFields inherited from interface com.illumon.iris.db.v2.sources.ColumnSource
ZERO_LENGTH_COLUMN_SOURCE_ARRAY -
Method Summary
Modifier and TypeMethodDescriptiondoublegetDouble(long index) Get the value at the index as a double.doublegetPrevDouble(long index) Get the previous value at the index as a double.voidColumnSource implementations that track previous values have the option to not actually start tracking previous values until this method is called.Methods inherited from class com.illumon.iris.db.v2.sources.AbstractColumnSource
allowsReinterpret, canUseGrouping, defaultFillChunk, doReinterpret, fillChunk, fillPrevChunk, getComponentType, getGroupingBuilder, getGroupingProvider, getNativeType, getType, hasGrouping, hasGrouping, isSerializable, match, matchWithGrouping, reinterpret, setGroupingProviderMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.illumon.iris.db.v2.sources.chunk.ChunkSource
fillChunk, getChunkTypeMethods inherited from interface com.illumon.iris.db.v2.sources.chunk.ChunkSource.WithPrev
fillPrevChunkMethods inherited from interface com.illumon.iris.db.v2.sources.ColumnSource
allowsReinterpret, cast, createPreviousTuple, createTuple, createTupleFromValues, exportElement, exportElement, exportToExternalKey, getColumnSources, getComponentType, getGroupingBuilder, getGroupingProvider, getNativeType, getPrevSource, getType, hasGrouping, hasGrouping, match, reinterpret, releaseCachedResources, setGroupingProviderMethods inherited from interface com.illumon.iris.db.v2.sources.ColumnSourceGetDefaults.ForDouble
get, getBoolean, getByte, getChar, getFloat, getInt, getLong, getShortMethods inherited from interface com.illumon.iris.db.v2.sources.chunk.DefaultChunkSource
getChunk, getChunk, getChunkByFilling, makeFillContext, makeGetContextMethods inherited from interface com.illumon.iris.db.v2.sources.chunk.DefaultChunkSource.WithPrev
getPrevChunk, getPrevChunk, getPrevChunkByFillingMethods inherited from interface com.illumon.iris.db.v2.sources.chunk.FillContextMaker
makeFillContextMethods inherited from interface com.illumon.iris.db.v2.sources.chunk.GetContextMaker
makeGetContextMethods inherited from interface com.illumon.iris.db.v2.sources.MutableColumnSource
isImmutableMethods inherited from interface com.illumon.iris.db.v2.sources.MutableColumnSourceGetDefaults.ForDouble
getPrev, getPrevBoolean, getPrevByte, getPrevChar, getPrevFloat, getPrevInt, getPrevLong, getPrevShortMethods inherited from interface com.illumon.iris.db.v2.tuples.TupleExporter
exportElementReinterpretedMethods inherited from interface com.illumon.iris.db.v2.tuples.TupleSource
createTupleFromReinterpretedValues
-
Method Details
-
startTrackingPrevValues
public void startTrackingPrevValues()Description copied from interface:ColumnSourceColumnSource 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:
startTrackingPrevValuesin interfaceColumnSource<Double>
-
getDouble
public double getDouble(long index) Description copied from interface:ElementSourceGet the value at the index as a double.- Specified by:
getDoublein interfaceElementSource<Double>- Parameters:
index- the location in index space to get the value from.- Returns:
- the double at the index, null values are represented by
QueryConstants.NULL_DOUBLE
-
getPrevDouble
public double getPrevDouble(long index) Description copied from interface:ElementSourceGet the previous value at the index as a double. SeeElementSource.getPrev(long)for more details.- Specified by:
getPrevDoublein interfaceElementSource<Double>- Parameters:
index- the location in index space to get the previous value from.- Returns:
- the previous double at the index, null values are represented by
QueryConstants.NULL_DOUBLE
-