Class DeferredViewTable
- All Implemented Interfaces:
TableOperations<Table,,Table> TableOperationsDefaults<Table,,Table> LogOutputAppendable,LivenessManager,LivenessNode,LivenessReferent,AttributeMap<Table>,GridAttributes<Table>,HasParentPerformanceIds,NotificationStepReceiver,NotificationStepSource,TableDefaults,Table,DynamicNode,NotificationQueue.Dependency,SystemicObject<Table>,LongSizedDataStructure,Serializable
UncoalescedTableImpl.coalesce() is forced.
Each DeferredViewTable defers at most one kind of operation: dropped columns, view columns, a rename or filters. A further operation wraps the table in another DeferredViewTable. The static factories, one per kind of operation, are the only way to create a DeferredViewTable.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThe table reference hides the table underlying table from us.Nested classes/interfaces inherited from class io.deephaven.engine.table.impl.BaseTable
BaseTable.CopyAttributeOperation, BaseTable.ListenerImpl, BaseTable.ShiftObliviousListenerImpl, BaseTable.SnapshotControlFactory<T extends ConstructSnapshot.SnapshotControl> -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final String[]protected final WhereFilter[]protected final SelectColumn[]Fields inherited from class io.deephaven.engine.table.impl.BaseTable
definition, PRINT_SERIALIZED_UPDATE_OVERLAPS, updateGraph, VALIDATE_UPDATE_OVERLAPSFields inherited from interface io.deephaven.engine.table.GridAttributes
COLUMN_DESCRIPTIONS_ATTRIBUTE, DESCRIPTION_ATTRIBUTE, LAYOUT_HINTS_ATTRIBUTE, SORTABLE_COLUMNS_ATTRIBUTEFields inherited from interface io.deephaven.engine.table.impl.NotificationStepReceiver
NULL_NOTIFICATION_STEPFields inherited from interface io.deephaven.engine.table.Table
ADD_ONLY_TABLE_ATTRIBUTE, AGGREGATION_ROW_LOOKUP_ATTRIBUTE, APPEND_ONLY_TABLE_ATTRIBUTE, BARRAGE_PERFORMANCE_KEY_ATTRIBUTE, BARRAGE_SCHEMA_ATTRIBUTE, BLINK_TABLE_ATTRIBUTE, FILTERABLE_COLUMNS_ATTRIBUTE, INITIALLY_EMPTY_COALESCED_SOURCE_TABLE_ATTRIBUTE, INPUT_TABLE_ATTRIBUTE, KEY_COLUMNS_ATTRIBUTE, MERGED_TABLE_ATTRIBUTE, NON_DISPLAY_TABLE, PLUGIN_NAME, PREVIEW_PARENT_TABLE, SNAPSHOT_VIEWPORT_TYPE, SORT_REVERSE_LOOKUP_ATTRIBUTE, SORT_ROW_REDIRECTION_ATTRIBUTE, SORTED_COLUMNS_ATTRIBUTE, SYSTEMIC_TABLE_ATTRIBUTE, TEST_SOURCE_TABLE_ATTRIBUTE, TOTALS_TABLE_ATTRIBUTE, TRANSPORT_COMPRESSION_ATTRIBUTE, UNIQUE_KEYS_ATTRIBUTEFields inherited from interface io.deephaven.engine.table.impl.TableDefaults
ZERO_LENGTH_TABLE_ARRAYFields inherited from interface io.deephaven.api.TableOperations
AGG_BY_PRESERVE_EMPTY_DEFAULTFields inherited from interface io.deephaven.api.TableOperationsDefaults
ZERO_LENGTH_COLUMNNAME_ARRAY, ZERO_LENGTH_FILTER_ARRAY -
Method Summary
Modifier and TypeMethodDescriptionprotected DeferredViewTableCreate a copy ofthisthat is constructed withattributesas its initial attributes.protected TableProduce the actual coalesced result table, suitable for caching.protected Tableredefine(TableDefinition newDefinitionExternal, TableDefinition newDefinitionInternal, SelectColumn[] viewColumns) Redefine this table with a subset of its current columns, with a potentially-differing definition to present to external interfaces and one or more select columns to apply.protected DeferredViewTableredefineImpl(TableDefinition newDefinition) Redefine this table with a proper-subset, or re-ordering, of its current columns.protected TableredefineWithRename(TableDefinition newDefinitionExternal, SourceColumn[] renameColumns) Redefine this table by renaming the table's columns.selectDistinct(Collection<? extends Selectable> columns) Methods inherited from class io.deephaven.engine.table.impl.RedefinableTable
dropColumns, redefine, renameColumns, updateView, viewMethods inherited from class io.deephaven.engine.table.impl.UncoalescedTableImpl
coalesce, coalescedIfAvailable, getCoalesced, setCoalescedMethods inherited from class io.deephaven.engine.table.impl.UncoalescedTable
addUpdateListener, addUpdateListener, addUpdateListener, addUpdateListenerUncoalesced, addUpdateListenerUncoalesced, aggAllBy, aggBy, apply, asOfJoin, awaitUpdate, awaitUpdate, byteColumnIterator, characterColumnIterator, columnIterator, doubleColumnIterator, exactJoin, flatten, floatColumnIterator, getColumnSource, getColumnSourceMap, getColumnSources, getRowSet, getSubTable, head, headBy, headPct, integerColumnIterator, isFlat, join, lazyUpdate, longColumnIterator, moveColumns, naturalJoin, objectColumnIterator, objectColumnIterator, partitionBy, partitionedAggBy, rangeJoin, removeUpdateListener, removeUpdateListener, removeUpdateListenerUncoalesced, reverse, rollup, select, shortColumnIterator, size, sizeForInstrumentation, slice, slicePct, snapshot, snapshotWhen, sort, tail, tailBy, tailPct, tree, ungroup, update, updateBy, verifyCoalescedForReuse, whereIn, whereNotIn, wouldMatchMethods inherited from class io.deephaven.engine.table.impl.BaseTable
addParentReference, append, assertAddOnly, assertAppendOnly, assertBlink, checkAvailableColumns, copyAttributes, copyAttributes, copySortableColumns, createSnapshotControlIfRefreshing, currentThreadMustNotWaitForOtherThreads, destroy, getDefinition, getDescription, getLastNotificationStep, getNotificationQueue, getUpdateGraph, hasListeners, initializeWithSnapshot, isAddOnly, isAppendOnly, isBlink, isFailed, isRefreshing, isSystemicObject, markSystemic, notifyListeners, notifyListeners, notifyListenersOnError, parentPerformanceEntryIds, removeBlink, satisfied, setLastNotificationStep, setRefreshing, setTotalsTable, shouldCopyAttribute, toString, withKeys, withUniqueKeysMethods inherited from class io.deephaven.engine.table.impl.BaseGridAttributes
clearSortingRestrictions, getSortableColumns, restrictSortTo, setColumnDescriptions, setLayoutHints, setSortableColumns, withColumnDescription, withColumnDescriptions, withDescriptionMethods inherited from class io.deephaven.engine.table.impl.LiveAttributeMap
copyAttributes, getAttribute, getAttributeKeys, getAttributes, getAttributes, getAttributesToCopy, hasAttribute, prepareReturnThis, published, retainingAttributes, setAttribute, setAttribute, withAttributes, withAttributes, withoutAttributesMethods inherited from class io.deephaven.engine.liveness.LivenessArtifact
manageWithCurrentScopeMethods inherited from class io.deephaven.engine.liveness.ReferenceCountedLivenessNode
ensureCleanupOnGC, findAnyManagedReferent, forEachManagedReference, getWeakReference, initializeTransientFieldsForLiveness, onReferenceCountAtZero, tryManage, tryUnmanage, tryUnmanageMethods inherited from class io.deephaven.engine.liveness.ReferenceCountedLivenessReferent
dropReference, tryRetainReferenceMethods inherited from class io.deephaven.util.referencecounting.ReferenceCounted
decrementReferenceCount, forceReferenceCountToZero, getReferenceCountDebug, incrementReferenceCount, resetReferenceCount, tryDecrementReferenceCount, tryIncrementReferenceCountMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.deephaven.engine.table.AttributeMap
getAttribute, getAttributeKeys, getAttributes, getAttributes, hasAttribute, retainingAttributes, withAttributes, withAttributes, withoutAttributesMethods inherited from interface io.deephaven.engine.table.GridAttributes
clearSortingRestrictions, restrictSortTo, setLayoutHints, withColumnDescription, withColumnDescriptions, withDescriptionMethods inherited from interface io.deephaven.engine.liveness.LivenessManager
manage, tryManage, tryUnmanage, tryUnmanage, unmanage, unmanageMethods inherited from interface io.deephaven.engine.liveness.LivenessReferent
dropReference, getReferentDescription, getWeakReference, retainReference, tryRetainReferenceMethods inherited from interface io.deephaven.util.datastructures.LongSizedDataStructure
intSize, intSizeMethods inherited from interface io.deephaven.engine.updategraph.NotificationQueue.Dependency
getUpdateGraphMethods inherited from interface io.deephaven.engine.table.impl.NotificationStepReceiver
initializeLastNotificationStepMethods inherited from interface io.deephaven.engine.table.impl.TableDefaults
addUpdateListener, applyToAllBy, applyToAllBy, applyToAllBy, close, dropColumnFormats, formatColumns, formatColumnWhere, formatRowWhere, getColumnSource, getColumnSource, getColumnSource, hasColumns, hasColumns, headBy, isEmpty, join, meta, moveColumnsDown, moveColumnsUp, numColumns, partitionBy, releaseCachedResources, renameAllColumns, renameColumns, rollup, rollup, rollup, rollup, rollup, selectDistinct, snapshotWhen, snapshotWhen, tailBy, wouldMatchMethods inherited from interface io.deephaven.api.TableOperationsDefaults
absSumBy, absSumBy, absSumBy, absSumBy, aggAllBy, aggAllBy, aggAllBy, aggBy, aggBy, aggBy, aggBy, aggBy, aggBy, aggBy, aj, aj, avgBy, avgBy, avgBy, avgBy, countBy, countBy, countBy, countBy, dropColumns, dropColumns, exactJoin, exactJoin, firstBy, firstBy, firstBy, firstBy, groupBy, groupBy, groupBy, join, join, join, join, lastBy, lastBy, lastBy, lastBy, lazyUpdate, maxBy, maxBy, maxBy, maxBy, medianBy, medianBy, medianBy, medianBy, minBy, minBy, minBy, minBy, naturalJoin, naturalJoin, naturalJoin, naturalJoin, naturalJoin, raj, raj, rangeJoin, select, select, selectDistinct, sort, sortDescending, stdBy, stdBy, stdBy, stdBy, sumBy, sumBy, sumBy, sumBy, ungroup, ungroup, ungroup, ungroup, update, updateBy, updateBy, updateBy, updateBy, updateBy, updateBy, updateBy, updateBy, updateView, varBy, varBy, varBy, varBy, view, wavgBy, wavgBy, wavgBy, wavgBy, where, whereIn, whereNotIn, wsumBy, wsumBy, wsumBy, wsumBy
-
Field Details
-
deferredDropColumns
-
deferredViewColumns
-
deferredFilters
-
-
Method Details
-
where
- Specified by:
wherein interfaceTableOperations<Table,Table> - Overrides:
wherein classUncoalescedTable<DeferredViewTable>
-
doCoalesce
Description copied from class:UncoalescedTableImplProduce the actual coalesced result table, suitable for caching.Note that if this table must have listeners registered, etc, setting these up is the implementation's responsibility.
Also note that the implementation should copy attributes, as in
copyAttributes(resultTable, CopyAttributeOperation.Coalesce).This is never invoked concurrently for the same table. For a refreshing table, a thread that may wait for its update graph first invokes this within its own
LivenessScopewhileforbiddento wait for any update graph. If the attempt succeeds, the liveness referents it produced are transferred to the caller's liveness manager. If it would wait, it is abandoned, the liveness referents it produced are released, and this is invoked again while the thread holds the shared lock.- Specified by:
doCoalescein classUncoalescedTableImpl<DeferredViewTable>- Returns:
- The coalesced result table, suitable for caching
-
selectDistinct
- Specified by:
selectDistinctin interfaceTableOperations<Table,Table> - Overrides:
selectDistinctin classUncoalescedTable<DeferredViewTable>
-
copy
Description copied from class:LiveAttributeMapCreate a copy ofthisthat is constructed withattributesas its initial attributes.- Specified by:
copyin classLiveAttributeMap<Table,DeferredViewTable> - Parameters:
attributes- The attributes for the copy, which implementations must pass to its constructor without modifying- Returns:
- The copy
-
redefineImpl
Description copied from class:RedefinableTableRedefine this table with a proper-subset, or re-ordering, of its current columns.- Specified by:
redefineImplin classRedefinableTable<DeferredViewTable>- Parameters:
newDefinition- A TableDefinition with a proper-subset of this RedefinableTable's ColumnDefinitions.- Returns:
- the redefined table
-
redefine
protected Table redefine(TableDefinition newDefinitionExternal, TableDefinition newDefinitionInternal, SelectColumn[] viewColumns) Description copied from class:RedefinableTableRedefine this table with a subset of its current columns, with a potentially-differing definition to present to external interfaces and one or more select columns to apply.- Specified by:
redefinein classRedefinableTable<DeferredViewTable>- Parameters:
newDefinitionExternal- A TableDefinition that represents the results of redefine(newDefinitionInternal).view(viewColumns).newDefinitionInternal- A TableDefinition with a subset of this RedefinableTable's ColumnDefinitions.viewColumns- A set of SelectColumns to apply in order to transform a table with newDefinitionInternal to a table with newDefinitionExternal. Each column may read the result of an earlier column, as inTableOperations.view(Collection).- Returns:
- the redefined table
-
redefineWithRename
protected Table redefineWithRename(TableDefinition newDefinitionExternal, SourceColumn[] renameColumns) Description copied from class:RedefinableTableRedefine this table by renaming the table's columns. Unlike the view columns ofRedefinableTable.redefine(TableDefinition, TableDefinition, SelectColumn[]), which apply in order, the rename columns apply simultaneously, asTable.renameColumns(Collection)requires: every rename column reads a column of this table, never the result of another rename column. Applied in order, a swap would read a column that the swap had already replaced.- Specified by:
redefineWithRenamein classRedefinableTable<DeferredViewTable>- Parameters:
newDefinitionExternal- A TableDefinition that represents the result of the rename.renameColumns- One SourceColumn per column of newDefinitionExternal, in the same order, each naming a column of this table to read.- Returns:
- the renamed table
-