Class ShortStaticCumSumOperator
java.lang.Object
com.illumon.iris.db.v2.updateby.internal.AbstractStaticUpdateByOperator
com.illumon.iris.db.v2.updateby.sum.ShortStaticCumSumOperator
- All Implemented Interfaces:
ChunkedUpdateByOperator
public class ShortStaticCumSumOperator extends AbstractStaticUpdateByOperator
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.illumon.iris.db.v2.updateby.ChunkedUpdateByOperator
ChunkedUpdateByOperator.BucketedUpdateContext, ChunkedUpdateByOperator.UpdateContext -
Field Summary
Fields inherited from interface com.illumon.iris.db.v2.updateby.ChunkedUpdateByOperator
ZERO_LENGTH_OP_ARRAY -
Constructor Summary
Constructors Constructor Description ShortStaticCumSumOperator(MatchPair sumPair) -
Method Summary
Modifier and Type Method Description voidaddChunk(ChunkedUpdateByOperator.BucketedUpdateContext context, Chunk<Attributes.Values> values, LongChunk<? extends Attributes.KeyIndices> keyChunk, IntChunk<Attributes.KeyIndices> bucketPositions, IntChunk<Attributes.ChunkPositions> startPositions, IntChunk<Attributes.ChunkLengths> length)Add a chunk of bucketed items to the operation.voidaddChunk(ChunkedUpdateByOperator.UpdateContext updateContext, LongChunk<Attributes.OrderedKeyIndices> keyChunk, Chunk<Attributes.Values> workingChunk, long groupPosition)Add a chunk of non-bucketed items to the operation.StringgetInputColumnName()Get the name of the input column this operator depends on.String[]getOutputColumnNames()Get an array of the output column names.Map<String,ColumnSource<?>>getOutputColumns()Get a map of outputName to outputColumnSourcefor this operation.voidinitializeFor(ChunkedUpdateByOperator.BucketedUpdateContext updateContext, UpdateBy.UpdateType type, ReadOnlyIndex updateIndex)Initialize the context for the specified stage of the update process.voidinitializeFor(ChunkedUpdateByOperator.UpdateContext updateContext, UpdateBy.UpdateType type, ReadOnlyIndex updateIndex)Initialize the context for the specified stage of the update process.ChunkedUpdateByOperator.BucketedUpdateContextmakeBucketedContext(int chunkSize)Make anChunkedUpdateByOperator.UpdateContextsuitable for use with bucketed updates.ChunkedUpdateByOperator.UpdateContextmakeUpdateContext(int chunkSize)Make anChunkedUpdateByOperator.UpdateContextsuitable for use with non-bucketed updates.voidsetBucketCapacity(int capacity)Notify the operator of the current maximum bucket.Methods inherited from class com.illumon.iris.db.v2.updateby.internal.AbstractStaticUpdateByOperator
anyModified, anyModified, applyShift, finishFor, finishFor, getAdditionalModifications, modifyChunk, removeChunk, setUpstream, setUpstream, startTrackingPrev
-
Constructor Details
-
Method Details
-
setBucketCapacity
public void setBucketCapacity(int capacity)Description copied from interface:ChunkedUpdateByOperatorNotify the operator of the current maximum bucket.- Specified by:
setBucketCapacityin interfaceChunkedUpdateByOperator- Overrides:
setBucketCapacityin classAbstractStaticUpdateByOperator- Parameters:
capacity- the capacity
-
getInputColumnName
Description copied from interface:ChunkedUpdateByOperatorGet the name of the input column this operator depends on.- Returns:
- the name of the input column
-
getOutputColumnNames
Description copied from interface:ChunkedUpdateByOperatorGet an array of the output column names.- Returns:
- the output column names.
-
getOutputColumns
Description copied from interface:ChunkedUpdateByOperatorGet a map of outputName to outputColumnSourcefor this operation.- Returns:
- a map of output column name to output column source
-
makeUpdateContext
Description copied from interface:ChunkedUpdateByOperatorMake anChunkedUpdateByOperator.UpdateContextsuitable for use with non-bucketed updates.- Parameters:
chunkSize- The expected size of chunks that will be provided during the update,- Returns:
- a new updateContext
-
makeBucketedContext
Description copied from interface:ChunkedUpdateByOperatorMake anChunkedUpdateByOperator.UpdateContextsuitable for use with bucketed updates.- Parameters:
chunkSize- The expected size of chunks that will be provided during the update,- Returns:
- a new updateContext
-
initializeFor
public void initializeFor(@NotNull ChunkedUpdateByOperator.UpdateContext updateContext, @NotNull UpdateBy.UpdateType type, @NotNull ReadOnlyIndex updateIndex)Description copied from interface:ChunkedUpdateByOperatorInitialize the context for the specified stage of the update process. This will always be followed by a call to
ChunkedUpdateByOperator.finishFor(UpdateContext, UpdateBy.UpdateType)at the end of each successful update.- Specified by:
initializeForin interfaceChunkedUpdateByOperator- Overrides:
initializeForin classAbstractStaticUpdateByOperator- Parameters:
updateContext- the context objecttype- the type of update being appliedupdateIndex- the index of rows associated with the update.
-
initializeFor
public void initializeFor(@NotNull ChunkedUpdateByOperator.BucketedUpdateContext updateContext, @NotNull UpdateBy.UpdateType type, @NotNull ReadOnlyIndex updateIndex)Description copied from interface:ChunkedUpdateByOperatorInitialize the context for the specified stage of the update process. This will always be followed by a call to
ChunkedUpdateByOperator.finishFor(UpdateContext, UpdateBy.UpdateType)at the end of each successful update.- Specified by:
initializeForin interfaceChunkedUpdateByOperator- Overrides:
initializeForin classAbstractStaticUpdateByOperator- Parameters:
updateContext- the context objecttype- the type of update being appliedupdateIndex- the index of rows associated with the update.
-
addChunk
public void addChunk(@NotNull ChunkedUpdateByOperator.UpdateContext updateContext, @NotNull LongChunk<Attributes.OrderedKeyIndices> keyChunk, @NotNull Chunk<Attributes.Values> workingChunk, long groupPosition)Description copied from interface:ChunkedUpdateByOperatorAdd a chunk of non-bucketed items to the operation.- Parameters:
updateContext- the context objectkeyChunk- a chunk of keys for the rows being addedworkingChunk- the chunk of values for the rows being addedgroupPosition- the group position
-
addChunk
public void addChunk(@NotNull ChunkedUpdateByOperator.BucketedUpdateContext context, @NotNull Chunk<Attributes.Values> values, @NotNull LongChunk<? extends Attributes.KeyIndices> keyChunk, @NotNull IntChunk<Attributes.KeyIndices> bucketPositions, @NotNull IntChunk<Attributes.ChunkPositions> startPositions, @NotNull IntChunk<Attributes.ChunkLengths> length)Description copied from interface:ChunkedUpdateByOperatorAdd a chunk of bucketed items to the operation.- Parameters:
context- the context objectvalues- the value chunkkeyChunk- a chunk of keys for the rows being addedbucketPositions- a chunk of hash bucket positions for each keystartPositions- the start position of a run within the chunklength- the length of each run of bucket values
-