Class UpdateBy
java.lang.Object
io.deephaven.engine.table.impl.updateby.UpdateBy
- Direct Known Subclasses:
ZeroKeyUpdateByManager
The core of the
TableOperations.updateBy(UpdateByControl, Collection, Collection)
operation.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
This helper class will process the update by clauses and organize the operators into windows that can be processed together. -
Field Summary
Modifier and TypeFieldDescriptionprotected final IntrusiveDoublyLinkedQueue<io.deephaven.engine.table.impl.updateby.UpdateByBucketHelper>
Store every bucket in this list for processingprotected final int[]
For easy iteration, create a list of the source indices that need to be cachedprotected final UpdateByControl
User control to specify UpdateBy parametersprotected final boolean
Whether caching benefits this UpdateBy operationprotected final boolean[]
Whether caching benefits each input sourceprotected final SoftReference<WritableColumnSource<?>>[]
References to the dense array sources we are using for the cached sources.protected final ColumnSource<?>[]
Input sources may be reused by multiple operators, only store and cache unique ones (post-reinterpret)protected final io.deephaven.engine.table.impl.updateby.UpdateBy.UpdateByRedirectionHelper
Helper class for maintaining the RowRedirection when using redirected output sourcesprotected final QueryTable
The source table for the UpdateBy operatorsprotected final String
The single timestamp column used by all time-based operatorsprotected final io.deephaven.engine.table.impl.updateby.UpdateByWindow[]
All the windows for this UpdateBy manager -
Constructor Summary
ModifierConstructorDescriptionprotected
UpdateBy
(@NotNull QueryTable source, @NotNull io.deephaven.engine.table.impl.updateby.UpdateByWindow[] windows, @NotNull ColumnSource<?>[] inputSources, @Nullable String timestampColumnName, @Nullable RowRedirection rowRedirection, @NotNull UpdateByControl control) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract boolean
protected abstract ModifiedColumnSet.Transformer
protected abstract QueryTable
result()
protected abstract io.deephaven.engine.table.impl.updateby.UpdateBy.UpdateByListener
static Table
updateBy
(@NotNull QueryTable source, @NotNull UpdateBy.UpdateByOperatorCollection operatorCollection, @NotNull UpdateByControl control) Apply the specified operations to each group of rows in the source table and produce a result table with the same row set as the source with each operator applied.static Table
updateBy
(@NotNull QueryTable source, @NotNull Collection<? extends UpdateByOperation> clauses, @NotNull Collection<? extends ColumnName> byColumns, @NotNull UpdateByControl control) protected abstract boolean
upstreamSatisfied
(long step)
-
Field Details
-
inputSources
Input sources may be reused by multiple operators, only store and cache unique ones (post-reinterpret) -
windows
protected final io.deephaven.engine.table.impl.updateby.UpdateByWindow[] windowsAll the windows for this UpdateBy manager -
source
The source table for the UpdateBy operators -
redirHelper
protected final io.deephaven.engine.table.impl.updateby.UpdateBy.UpdateByRedirectionHelper redirHelperHelper class for maintaining the RowRedirection when using redirected output sources -
control
User control to specify UpdateBy parameters -
timestampColumnName
The single timestamp column used by all time-based operators -
inputCacheNeeded
protected final boolean inputCacheNeededWhether caching benefits this UpdateBy operation -
inputSourceCacheNeeded
protected final boolean[] inputSourceCacheNeededWhether caching benefits each input source -
inputSourceCaches
References to the dense array sources we are using for the cached sources. It's expected that these will be released and need to be created. -
cacheableSourceIndices
protected final int[] cacheableSourceIndicesFor easy iteration, create a list of the source indices that need to be cached -
buckets
protected final IntrusiveDoublyLinkedQueue<io.deephaven.engine.table.impl.updateby.UpdateByBucketHelper> bucketsStore every bucket in this list for processing
-
-
Constructor Details
-
UpdateBy
protected UpdateBy(@NotNull @NotNull QueryTable source, @NotNull @NotNull io.deephaven.engine.table.impl.updateby.UpdateByWindow[] windows, @NotNull @NotNull ColumnSource<?>[] inputSources, @Nullable @Nullable String timestampColumnName, @Nullable @Nullable RowRedirection rowRedirection, @NotNull @NotNull UpdateByControl control)
-
-
Method Details
-
result
-
sourceListener
protected abstract io.deephaven.engine.table.impl.updateby.UpdateBy.UpdateByListener sourceListener() -
mcsTransformer
-
upstreamSatisfied
protected abstract boolean upstreamSatisfied(long step) -
maybeDeliverPendingFailure
protected abstract boolean maybeDeliverPendingFailure() -
updateBy
public static Table updateBy(@NotNull @NotNull QueryTable source, @NotNull @NotNull Collection<? extends UpdateByOperation> clauses, @NotNull @NotNull Collection<? extends ColumnName> byColumns, @NotNull @NotNull UpdateByControl control) -
updateBy
public static Table updateBy(@NotNull @NotNull QueryTable source, @NotNull @NotNull UpdateBy.UpdateByOperatorCollection operatorCollection, @NotNull @NotNull UpdateByControl control) Apply the specified operations to each group of rows in the source table and produce a result table with the same row set as the source with each operator applied.- Parameters:
source
- the source to apply to.operatorCollection
- the collection of operations to apply.- Returns:
- a new table with the same index as the source with all the operations applied.
-