Class RollingGroupOperator.Context
java.lang.Object
io.deephaven.engine.table.impl.updateby.UpdateByOperator.Context
io.deephaven.engine.table.impl.updateby.rollinggroup.RollingGroupOperator.Context
- All Implemented Interfaces:
SafeCloseable,AutoCloseable
- Enclosing class:
- RollingGroupOperator
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal WritableLongChunk<Values>final WritableObjectChunk<RowSet,? extends Values> final WritableLongChunk<Values>Fields inherited from class io.deephaven.engine.table.impl.updateby.UpdateByOperator.Context
affectedPosChunk, influencerPosChunk, nullCount -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaccumulateCumulative(@NotNull RowSequence inputKeys, Chunk<? extends Values>[] valueChunkArr, LongChunk<? extends Values> tsChunk, int len) For cumulative operators only, this method will be called to pass the input chunk data to the operator and produce the output data values.voidaccumulateRolling(@NotNull RowSequence inputKeys, Chunk<? extends Values>[] influencerValueChunkArr, LongChunk<OrderedRowKeys> affectedPosChunk, LongChunk<OrderedRowKeys> influencerPosChunk, IntChunk<? extends Values> pushChunk, IntChunk<? extends Values> popChunk, int affectedCount, int influencerCount) For windowed operators only, this method will be called to pass the input chunk data to the operator and produce the output data values.voidclose()voidpop(int count) Remove values from the operators current data set.voidpush(int pos, int count) Add values to the operators current data setvoidreset()Reset the operator data values to a known state.voidsetValueChunks(@NotNull Chunk<? extends Values>[] valueChunks) voidwriteToOutputChunk(int outIdx) Write the current value for this row to the output chunkvoidwriteToOutputColumn(@NotNull RowSequence inputKeys) Write the output chunk to the output columnMethods inherited from class io.deephaven.engine.table.impl.updateby.UpdateByOperator.Context
isValueValid, setPosChunks
-
Field Details
-
groupRowSetSourceFillFromContext
-
groupRowSetSourceOutputValues
-
startSourceFillFromContext
-
startSourceOutputValues
-
endSourceFillFromContext
-
endSourceOutputValues
-
-
Constructor Details
-
Context
protected Context(int chunkSize)
-
-
Method Details
-
close
public void close() -
accumulateCumulative
public void accumulateCumulative(@NotNull @NotNull RowSequence inputKeys, Chunk<? extends Values>[] valueChunkArr, LongChunk<? extends Values> tsChunk, int len) Description copied from class:UpdateByOperator.ContextFor cumulative operators only, this method will be called to pass the input chunk data to the operator and produce the output data values.- Specified by:
accumulateCumulativein classUpdateByOperator.Context- Parameters:
inputKeys- the keys for the input data rows (also matches the output keys)valueChunkArr- the input data chunks needed by the operator for internal calculationstsChunk- the timestamp chunk for the input data (if applicable)len- the number of items in the input data chunks
-
accumulateRolling
public void accumulateRolling(@NotNull @NotNull RowSequence inputKeys, Chunk<? extends Values>[] influencerValueChunkArr, LongChunk<OrderedRowKeys> affectedPosChunk, LongChunk<OrderedRowKeys> influencerPosChunk, IntChunk<? extends Values> pushChunk, IntChunk<? extends Values> popChunk, int affectedCount, int influencerCount) Description copied from class:UpdateByOperator.ContextFor windowed operators only, this method will be called to pass the input chunk data to the operator and produce the output data values. It is important to note that the size of the influencer (input) and affected (output) chunks are not likely be the same. We pass these sizes explicitly to the operators for the sake of the operators (such asCountWhereOperatorwith zero input columns) where no input chunks are provided but we must still process the exact number of input rows.- Specified by:
accumulateRollingin classUpdateByOperator.Context- Parameters:
inputKeys- the keys for the input data rows (also matches the output keys)influencerValueChunkArr- the input data chunks needed by the operator for internal calculations, these values will be pushed and popped into the current windowaffectedPosChunk- the row positions of the affected rowsinfluencerPosChunk- the row positions of the influencer rowspushChunk- a chunk containing the push instructions for each output row to be calculatedpopChunk- a chunk containing the pop instructions for each output row to be calculatedaffectedCount- how many affected (output) rows are being computedinfluencerCount- how many influencer (input) rows are needed for the computation
-
setValueChunks
- Specified by:
setValueChunksin classUpdateByOperator.Context
-
push
public void push(int pos, int count) Description copied from class:UpdateByOperator.ContextAdd values to the operators current data set- Specified by:
pushin classUpdateByOperator.Context- Parameters:
pos- the index in the associated chunk where this value can be found. Depending on the usage, might be a values chunk (for cumulative operators) or an influencer values chunk (for windowed). It is the task of the operator to pull the data from the chunk and use it properlycount- the number of items to push from the chunk
-
pop
public void pop(int count) Description copied from class:UpdateByOperator.ContextRemove values from the operators current data set. This is only valid for windowed operators as cumulative operators only append values- Overrides:
popin classUpdateByOperator.Context- Parameters:
count- the number of items to pop from the data set
-
writeToOutputChunk
public void writeToOutputChunk(int outIdx) Description copied from class:UpdateByOperator.ContextWrite the current value for this row to the output chunk- Specified by:
writeToOutputChunkin classUpdateByOperator.Context
-
reset
public void reset()Description copied from class:UpdateByOperator.ContextReset the operator data values to a known state. This may occur during initialization or when a windowed operator has an empty window- Specified by:
resetin classUpdateByOperator.Context
-
writeToOutputColumn
Description copied from class:UpdateByOperator.ContextWrite the output chunk to the output column- Specified by:
writeToOutputColumnin classUpdateByOperator.Context
-