Class DoubleAggregateColumnSource
java.lang.Object
com.illumon.iris.db.v2.sources.AbstractColumnSource<DB_ARRAY_TYPE>
com.illumon.iris.db.v2.sources.aggregate.DoubleAggregateColumnSource
- All Implemented Interfaces:
AggregateColumnSource<DbDoubleArray,Double>,ChunkSource<Attributes.Values>,ChunkSource.WithPrev<Attributes.Values>,DefaultChunkSource<Attributes.Values>,DefaultChunkSource.WithPrev<Attributes.Values>,FillContextMaker,GetContextMaker,ColumnSource<DbDoubleArray>,ColumnSourceGetDefaults.ForObject<DbDoubleArray>,ElementSource<DbDoubleArray>,MutableColumnSource<DbDoubleArray>,MutableColumnSourceGetDefaults.ForObject<DbDoubleArray>,Releasable,UngroupableColumnSource,TupleExporter<DbDoubleArray>,TupleSource<DbDoubleArray>,Serializable
public final class DoubleAggregateColumnSource extends AbstractColumnSource<DB_ARRAY_TYPE>
ColumnSource implementation for aggregation result double columns.- See Also:
- Serialized Form
-
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.aggregate.AggregateColumnSource
AggregateColumnSource.AggregateColumnSourceConstructor, AggregateColumnSource.FactoryHelperNested 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 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 Type Method Description voidfillChunk(ChunkSource.FillContext context, WritableChunk<? super Attributes.Values> destination, OrderedKeys orderedKeys)Populates the given destination chunk with data corresponding to the keys from the givenOrderedKeys.voidfillPrevChunk(ChunkSource.FillContext context, WritableChunk<? super Attributes.Values> destination, OrderedKeys orderedKeys)Populates the given destination chunk with data corresponding to the keys from the givenOrderedKeys.DbDoubleArrayget(long index)Get the value from the source.DbDoubleArraygetPrev(long index)Get the previous value at the index.ObjectgetUngrouped(long groupIndexKey, int offsetInGroup)Reach into a grouped column source and pull one element out of the array.BooleangetUngroupedBoolean(long groupIndexKey, int offsetInGroup)bytegetUngroupedByte(long groupIndexKey, int offsetInGroup)chargetUngroupedChar(long groupIndexKey, int offsetInGroup)doublegetUngroupedDouble(long groupIndexKey, int offsetInGroup)floatgetUngroupedFloat(long groupIndexKey, int offsetInGroup)intgetUngroupedInt(long groupIndexKey, int offsetInGroup)longgetUngroupedLong(long groupIndexKey, int offsetInGroup)ObjectgetUngroupedPrev(long groupIndexKey, int offsetInGroup)BooleangetUngroupedPrevBoolean(long groupIndexKey, int offsetInGroup)bytegetUngroupedPrevByte(long groupIndexKey, int offsetInGroup)chargetUngroupedPrevChar(long groupIndexKey, int offsetInGroup)doublegetUngroupedPrevDouble(long groupIndexKey, int offsetInGroup)floatgetUngroupedPrevFloat(long groupIndexKey, int offsetInGroup)intgetUngroupedPrevInt(long groupIndexKey, int offsetInGroup)longgetUngroupedPrevLong(long groupIndexKey, int offsetInGroup)shortgetUngroupedPrevShort(long groupIndexKey, int offsetInGroup)longgetUngroupedPrevSize(long groupIndexKey)shortgetUngroupedShort(long groupIndexKey, int offsetInGroup)longgetUngroupedSize(long groupIndexKey)booleanisImmutable()Determine if this column source is immutable, meaning that the values at a given index key never change.booleanisUngroupable()Does this particular instance of the column source support ungrouping?ChunkSource.FillContextmakeFillContext(int chunkCapacity, SharedContext sharedContext)Allocate a newChunkSource.FillContextfor filling chunks from thisFillContextMaker, typically aChunkSource.voidstartTrackingPrevValues()ColumnSource implementations that track previous values have the option to not actually start tracking previous values until this method is called.UngroupedColumnSource<COMPONENT_TYPE>ungrouped()Methods inherited from class com.illumon.iris.db.v2.sources.AbstractColumnSource
allowsReinterpret, defaultFillChunk, doReinterpret, getComponentType, getGroupingBuilder, getGroupingProvider, getNativeType, getType, hasGrouping, isSerializable, match, 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.ColumnSource
allowsReinterpret, cast, createPreviousTuple, createTuple, createTupleFromValues, exportElement, exportElement, exportToExternalKey, getColumnSources, getComponentType, getGroupingBuilder, getGroupingProvider, getNativeType, getPrevSource, getType, hasGrouping, match, reinterpret, releaseCachedResources, setGroupingProviderMethods inherited from interface com.illumon.iris.db.v2.sources.ColumnSourceGetDefaults.ForObject
getBoolean, getByte, getChar, getDouble, getFloat, getInt, getLong, getShortMethods inherited from interface com.illumon.iris.db.v2.sources.chunk.DefaultChunkSource
getChunk, getChunk, getChunkByFilling, 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.MutableColumnSourceGetDefaults.ForObject
getPrevBoolean, getPrevByte, getPrevChar, getPrevDouble, 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
-
get
Description copied from interface:ElementSourceGet the value from the source. This may return boxed values for basic types.- Parameters:
index- the location in index space to get the value from.- Returns:
- the value at the index, potentially null.
-
getPrev
Description copied from interface:ElementSourceGet the previous value at the index. Previous values are used during anLTMupdatecycle to process changes in data. Duringnormaloperation previous values will be identical tocurrentvalues.- Parameters:
index- the location in index space to get the value from.- Returns:
- the previous value at the index, or null.
-
fillChunk
public void fillChunk(@NotNull ChunkSource.FillContext context, @NotNull WritableChunk<? super Attributes.Values> destination, @NotNull OrderedKeys orderedKeys)Description copied from interface:ChunkSourcePopulates the given destination chunk with data corresponding to the keys from the givenOrderedKeys.- Specified by:
fillChunkin interfaceChunkSource<Attributes.Values>- Overrides:
fillChunkin classAbstractColumnSource<DbDoubleArray>- Parameters:
context- A context containing all mutable/state related data used in retrieving the Chunk.destination- The chunk to be populated according toorderedKeys. No assumptions shall be made about the size of the chunk shall be made. The chunk will be populated from position [0,orderedKeys.size()).orderedKeys- AnOrderedKeysrepresenting the keys to be fetched
-
fillPrevChunk
public void fillPrevChunk(@NotNull ChunkSource.FillContext context, @NotNull WritableChunk<? super Attributes.Values> destination, @NotNull OrderedKeys orderedKeys)Description copied from interface:ChunkSource.WithPrevPopulates the given destination chunk with data corresponding to the keys from the givenOrderedKeys.- Specified by:
fillPrevChunkin interfaceChunkSource.WithPrev<Attributes.Values>- Overrides:
fillPrevChunkin classAbstractColumnSource<DbDoubleArray>- Parameters:
context- A context containing all mutable/state related data used in retrieving the Chunk.destination- The chunk to be populated according toorderedKeys. No assumptions shall be made about the size of the chunk shall be made. The chunk will be populated from position [0,orderedKeys.size()).orderedKeys- AnOrderedKeysrepresenting the keys to be fetched
-
ungrouped
- Specified by:
ungroupedin interfaceAggregateColumnSource<DB_ARRAY_TYPE extends DbArrayBase,COMPONENT_TYPE>
-
startTrackingPrevValues
public final 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<DB_ARRAY_TYPE extends DbArrayBase>
-
makeFillContext
public final ChunkSource.FillContext makeFillContext(int chunkCapacity, SharedContext sharedContext)Description copied from interface:FillContextMakerAllocate a newChunkSource.FillContextfor filling chunks from thisFillContextMaker, typically aChunkSource.- Specified by:
makeFillContextin interfaceDefaultChunkSource<DB_ARRAY_TYPE extends DbArrayBase>- Specified by:
makeFillContextin interfaceFillContextMaker- Parameters:
chunkCapacity- The maximum size of anyWritableChunkthat will be filled with this contextsharedContext- Shared store of intermediate results.- Returns:
- A context for use with fill operations
-
isUngroupable
public final boolean isUngroupable()Description copied from interface:UngroupableColumnSourceDoes this particular instance of the column source support ungrouping?- Specified by:
isUngroupablein interfaceUngroupableColumnSource- Returns:
- true if you can call the getUngrouped family of methods and get a valid answer.
-
getUngroupedSize
public final long getUngroupedSize(long groupIndexKey)- Specified by:
getUngroupedSizein interfaceUngroupableColumnSource- Parameters:
groupIndexKey- the index within this column to interrogate- Returns:
- the size of the DbArray at columnIndex.
-
getUngroupedPrevSize
public final long getUngroupedPrevSize(long groupIndexKey)- Specified by:
getUngroupedPrevSizein interfaceUngroupableColumnSource
-
getUngrouped
Description copied from interface:UngroupableColumnSourceReach into a grouped column source and pull one element out of the array.- Specified by:
getUngroupedin interfaceUngroupableColumnSource- Parameters:
groupIndexKey- the index within the column of the cell to getoffsetInGroup- the index within the array at the specified cell- Returns:
- Equivalent to ((DbArray)columnSource.get(columnIndex)).get(arrayIndex)
-
getUngroupedPrev
- Specified by:
getUngroupedPrevin interfaceUngroupableColumnSource
-
getUngroupedBoolean
- Specified by:
getUngroupedBooleanin interfaceUngroupableColumnSource
-
getUngroupedPrevBoolean
- Specified by:
getUngroupedPrevBooleanin interfaceUngroupableColumnSource
-
getUngroupedDouble
public final double getUngroupedDouble(long groupIndexKey, int offsetInGroup)- Specified by:
getUngroupedDoublein interfaceUngroupableColumnSource
-
getUngroupedPrevDouble
public final double getUngroupedPrevDouble(long groupIndexKey, int offsetInGroup)- Specified by:
getUngroupedPrevDoublein interfaceUngroupableColumnSource
-
getUngroupedFloat
public final float getUngroupedFloat(long groupIndexKey, int offsetInGroup)- Specified by:
getUngroupedFloatin interfaceUngroupableColumnSource
-
getUngroupedPrevFloat
public final float getUngroupedPrevFloat(long groupIndexKey, int offsetInGroup)- Specified by:
getUngroupedPrevFloatin interfaceUngroupableColumnSource
-
getUngroupedByte
public final byte getUngroupedByte(long groupIndexKey, int offsetInGroup)- Specified by:
getUngroupedBytein interfaceUngroupableColumnSource
-
getUngroupedPrevByte
public final byte getUngroupedPrevByte(long groupIndexKey, int offsetInGroup)- Specified by:
getUngroupedPrevBytein interfaceUngroupableColumnSource
-
getUngroupedChar
public final char getUngroupedChar(long groupIndexKey, int offsetInGroup)- Specified by:
getUngroupedCharin interfaceUngroupableColumnSource
-
getUngroupedPrevChar
public final char getUngroupedPrevChar(long groupIndexKey, int offsetInGroup)- Specified by:
getUngroupedPrevCharin interfaceUngroupableColumnSource
-
getUngroupedShort
public final short getUngroupedShort(long groupIndexKey, int offsetInGroup)- Specified by:
getUngroupedShortin interfaceUngroupableColumnSource
-
getUngroupedPrevShort
public final short getUngroupedPrevShort(long groupIndexKey, int offsetInGroup)- Specified by:
getUngroupedPrevShortin interfaceUngroupableColumnSource
-
getUngroupedInt
public final int getUngroupedInt(long groupIndexKey, int offsetInGroup)- Specified by:
getUngroupedIntin interfaceUngroupableColumnSource
-
getUngroupedPrevInt
public final int getUngroupedPrevInt(long groupIndexKey, int offsetInGroup)- Specified by:
getUngroupedPrevIntin interfaceUngroupableColumnSource
-
getUngroupedLong
public final long getUngroupedLong(long groupIndexKey, int offsetInGroup)- Specified by:
getUngroupedLongin interfaceUngroupableColumnSource
-
getUngroupedPrevLong
public final long getUngroupedPrevLong(long groupIndexKey, int offsetInGroup)- Specified by:
getUngroupedPrevLongin interfaceUngroupableColumnSource
-
isImmutable
public boolean isImmutable()Description copied from interface:ColumnSourceDetermine if this column source is immutable, meaning that the values at a given index key never change.- Specified by:
isImmutablein interfaceColumnSource<DB_ARRAY_TYPE extends DbArrayBase>- Specified by:
isImmutablein interfaceMutableColumnSource<DB_ARRAY_TYPE extends DbArrayBase>- Returns:
- true if the values at a given index of the column source never change, false otherwise
-