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
Nested ClassesModifier and TypeClassDescriptionstatic classThis helper class will process the update by clauses and organize the operators into windows that can be processed together. -
Field Summary
FieldsModifier 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 UpdateByControlUser control to specify UpdateBy parametersprotected final booleanWhether 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.UpdateByRedirectionHelperHelper class for maintaining the RowRedirection when using redirected output sourcesprotected final QueryTableThe source table for the UpdateBy operatorsprotected final StringThe 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
ConstructorsModifierConstructorDescriptionprotectedUpdateBy(@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 booleanprotected abstract ModifiedColumnSet.Transformerprotected abstract QueryTableresult()protected abstract io.deephaven.engine.table.impl.updateby.UpdateBy.UpdateByListenerstatic TableupdateBy(@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 TableupdateBy(@NotNull QueryTable source, @NotNull Collection<? extends UpdateByOperation> clauses, @NotNull Collection<? extends ColumnName> byColumns, @NotNull UpdateByControl control) protected abstract booleanupstreamSatisfied(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.
-