Class AbstractStaticUpdateByOperator
java.lang.Object
com.illumon.iris.db.v2.updateby.internal.AbstractStaticUpdateByOperator
- All Implemented Interfaces:
ChunkedUpdateByOperator
- Direct Known Subclasses:
BaseObjectBinaryStaticOperator,BaseStaticEMAOperator,BigNumberStaticEMAOperator,BooleanStaticChunkedFillByOperator,BooleanStaticCumSumOperator,ByteStaticChunkedFillByOperator,ByteStaticCumMinMaxOperator,ByteStaticCumProdOperator,ByteStaticCumSumOperator,CharStaticChunkedFillByOperator,DoubleStaticChunkedFillByOperator,DoubleStaticCumMinMaxOperator,DoubleStaticCumProdOperator,DoubleStaticCumSumOperator,FloatStaticChunkedFillByOperator,FloatStaticCumMinMaxOperator,FloatStaticCumProdOperator,FloatStaticCumSumOperator,IntegerStaticCumMinMaxOperator,IntegerStaticCumProdOperator,IntegerStaticCumSumOperator,IntStaticChunkedFillByOperator,LongRecordingUpdateByOperator,LongStaticChunkedFillByOperator,LongStaticCumMinMaxOperator,LongStaticCumProdOperator,LongStaticCumSumOperator,ObjectStaticChunkedFillByOperator,ShortStaticChunkedFillByOperator,ShortStaticCumMinMaxOperator,ShortStaticCumProdOperator,ShortStaticCumSumOperator
public abstract class AbstractStaticUpdateByOperator extends Object implements ChunkedUpdateByOperator
-
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 AbstractStaticUpdateByOperator() -
Method Summary
Modifier and Type Method Description booleananyModified(ChunkedUpdateByOperator.BucketedUpdateContext ctx)Check if the update has modified any rows for this operator.booleananyModified(ChunkedUpdateByOperator.UpdateContext ctx)Check if the update has modified any rows for this operator.voidapplyShift(ChunkedUpdateByOperator.UpdateContext updateContext, ReadOnlyIndex prevIndex, IndexShiftData shifted)Apply a shift to the operation.voidfinishFor(ChunkedUpdateByOperator.BucketedUpdateContext updateContext, UpdateBy.UpdateType type)Perform and bookkeeping required at the end of a single part of the update.voidfinishFor(ChunkedUpdateByOperator.UpdateContext updateContext, UpdateBy.UpdateType type)Perform and bookkeeping required at the end of a single part of the update.ReadOnlyIndexgetAdditionalModifications(ChunkedUpdateByOperator.UpdateContext ctx)Get an index of rows that were modified beyond the input set of modifications from the upstream.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.voidmodifyChunk(ChunkedUpdateByOperator.UpdateContext updateContext, LongChunk<Attributes.OrderedKeyIndices> prevKeyChunk, LongChunk<Attributes.OrderedKeyIndices> keyChunk, Chunk<Attributes.Values> prevWorkingChunk, Chunk<Attributes.Values> postWorkingChunk, long groupPosition)Modify a chunk of values with the operation.voidremoveChunk(ChunkedUpdateByOperator.UpdateContext updateContext, LongChunk<Attributes.OrderedKeyIndices> keyChunk, Chunk<Attributes.Values> prevWorkingChunk, long groupPosition)Remove a chunk of values from the operation.voidsetBucketCapacity(int capacity)Notify the operator of the current maximum bucket.voidsetUpstream(ChunkedUpdateByOperator.BucketedUpdateContext ctx, ShiftAwareListener.Update upstream)Set theupstreamupdate object for this update cycle.voidsetUpstream(ChunkedUpdateByOperator.UpdateContext ctx, ShiftAwareListener.Update upstream)Set theupstreamupdate object for this update cycle.voidstartTrackingPrev()Indicate that the operation should start tracking previous values for ticking updates.Methods 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.updateby.ChunkedUpdateByOperator
addChunk, addChunk, getInputColumnName, getOutputColumnNames, getOutputColumns, makeBucketedContext, makeUpdateContext
-
Constructor Details
-
AbstractStaticUpdateByOperator
public AbstractStaticUpdateByOperator()
-
-
Method Details
-
setBucketCapacity
public void setBucketCapacity(int capacity)Description copied from interface:ChunkedUpdateByOperatorNotify the operator of the current maximum bucket.- Specified by:
setBucketCapacityin interfaceChunkedUpdateByOperator- Parameters:
capacity- the capacity
-
setUpstream
public void setUpstream(@NotNull ChunkedUpdateByOperator.UpdateContext ctx, @NotNull ShiftAwareListener.Update upstream)Description copied from interface:ChunkedUpdateByOperatorSet theupstreamupdate object for this update cycle.- Specified by:
setUpstreamin interfaceChunkedUpdateByOperator- Parameters:
ctx- the context objectupstream- the upstream update
-
setUpstream
public void setUpstream(@NotNull ChunkedUpdateByOperator.BucketedUpdateContext ctx, @NotNull ShiftAwareListener.Update upstream)Description copied from interface:ChunkedUpdateByOperatorSet theupstreamupdate object for this update cycle.- Specified by:
setUpstreamin interfaceChunkedUpdateByOperator- Parameters:
ctx- the context objectupstream- the upstream update
-
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- 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- Parameters:
updateContext- the context objecttype- the type of update being appliedupdateIndex- the index of rows associated with the update.
-
finishFor
public void finishFor(@NotNull ChunkedUpdateByOperator.UpdateContext updateContext, @NotNull UpdateBy.UpdateType type)Description copied from interface:ChunkedUpdateByOperatorPerform and bookkeeping required at the end of a single part of the update. This is always preceded with a call toChunkedUpdateByOperator.initializeFor(UpdateContext, UpdateBy.UpdateType, ReadOnlyIndex)- Specified by:
finishForin interfaceChunkedUpdateByOperator- Parameters:
updateContext- the context objecttype- the type of update being applied
-
finishFor
public void finishFor(@NotNull ChunkedUpdateByOperator.BucketedUpdateContext updateContext, @NotNull UpdateBy.UpdateType type)Description copied from interface:ChunkedUpdateByOperatorPerform and bookkeeping required at the end of a single part of the update. This is always preceded with a call toChunkedUpdateByOperator.initializeFor(UpdateContext, UpdateBy.UpdateType, ReadOnlyIndex)- Specified by:
finishForin interfaceChunkedUpdateByOperator- Parameters:
updateContext- the context objecttype- the type of update being applied
-
startTrackingPrev
public final void startTrackingPrev()Description copied from interface:ChunkedUpdateByOperatorIndicate that the operation should start tracking previous values for ticking updates.- Specified by:
startTrackingPrevin interfaceChunkedUpdateByOperator
-
modifyChunk
public final void modifyChunk(@NotNull ChunkedUpdateByOperator.UpdateContext updateContext, @NotNull LongChunk<Attributes.OrderedKeyIndices> prevKeyChunk, @NotNull LongChunk<Attributes.OrderedKeyIndices> keyChunk, @NotNull Chunk<Attributes.Values> prevWorkingChunk, @NotNull Chunk<Attributes.Values> postWorkingChunk, long groupPosition)Description copied from interface:ChunkedUpdateByOperatorModify a chunk of values with the operation.- Specified by:
modifyChunkin interfaceChunkedUpdateByOperator- Parameters:
updateContext- the context objectprevKeyChunk- a chunk of pre-shift keys. This will be equal tokeyChunkif no shift is presentkeyChunk- a chunk of post-shift space keys for the update.prevWorkingChunk- a chunk of previous values for the updatepostWorkingChunk- a chunk of current values for the update
-
removeChunk
public final void removeChunk(@NotNull ChunkedUpdateByOperator.UpdateContext updateContext, @NotNull LongChunk<Attributes.OrderedKeyIndices> keyChunk, @NotNull Chunk<Attributes.Values> prevWorkingChunk, long groupPosition)Description copied from interface:ChunkedUpdateByOperatorRemove a chunk of values from the operation.- Specified by:
removeChunkin interfaceChunkedUpdateByOperator- Parameters:
updateContext- the context objectkeyChunk- a chunk of keys being removed.prevWorkingChunk- the chunk of values being removed
-
applyShift
public final void applyShift(@NotNull ChunkedUpdateByOperator.UpdateContext updateContext, @NotNull ReadOnlyIndex prevIndex, @NotNull IndexShiftData shifted)Description copied from interface:ChunkedUpdateByOperatorApply a shift to the operation.- Specified by:
applyShiftin interfaceChunkedUpdateByOperator- Parameters:
updateContext- the context objectprevIndex- the pre-shifted indexshifted- the shifts being applied
-
getAdditionalModifications
@NotNull public final ReadOnlyIndex getAdditionalModifications(@NotNull ChunkedUpdateByOperator.UpdateContext ctx)Description copied from interface:ChunkedUpdateByOperatorGet an index of rows that were modified beyond the input set of modifications from the upstream. This is invoked once at the end of a complete update cycle (that is, after all adds, removes, modifies and shifts have been processed) ifChunkedUpdateByOperator.anyModified(UpdateContext)has returned true.- Specified by:
getAdditionalModificationsin interfaceChunkedUpdateByOperator- Parameters:
ctx- the context object- Returns:
- a
indexof additional rows that were modified
-
anyModified
Description copied from interface:ChunkedUpdateByOperatorCheck if the update has modified any rows for this operator. This is invoked once at the end of a complete update cycle (that is, after all adds, removes, modifies and shifts have been processed).- Specified by:
anyModifiedin interfaceChunkedUpdateByOperator- Parameters:
ctx- the context object- Returns:
- true if the update modified any rows.
-
anyModified
Description copied from interface:ChunkedUpdateByOperatorCheck if the update has modified any rows for this operator. This is invoked once at the end of a complete update cycle (that is, after all adds, removes, modifies and shifts have been processed).- Specified by:
anyModifiedin interfaceChunkedUpdateByOperator- Parameters:
ctx- the context object- Returns:
- true if the update modified any rows.
-