Interface TableDefaults
- All Superinterfaces:
AttributeMap<Table>,DynamicNode,GridAttributes<Table>,LivenessManager,LivenessNode,LivenessReferent,LogOutputAppendable,LongSizedDataStructure,NotificationQueue.Dependency,SystemicObject<Table>,Table,TableOperations<Table,,Table> TableOperationsDefaults<Table,Table>
- All Known Subinterfaces:
TableAdapter
- All Known Implementing Classes:
AppendOnlyArrayBackedInputTable,BarrageBlinkTable,BarrageRedirectedTable,BarrageTable,BaseTable,DeferredViewTable,IcebergTableImpl,InMemoryTable,KeyedArrayBackedInputTable,PartitionAwareSourceTable,QueryReplayGroupedTable,QueryTable,QueryTable.FilteredTable,RedefinableTable,ReplayGroupedFullTable,ReplayLastByGroupedTable,ReplayTable,ReplayTableBase,SimpleSourceTable,SourceTable,TimeTable,UncoalescedTable,UpdatableTable,UpdateSourceQueryTable
Table.-
Field Summary
FieldsFields 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.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, UNIQUE_KEYS_ATTRIBUTEFields 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 TypeMethodDescriptiondefault voidaddUpdateListener(ShiftObliviousListener listener) Subscribe for updates to this table.default TableapplyToAllBy(String formulaColumn, String... groupByColumns) Groups data according to groupByColumns and applies formulaColumn to each of columns not altered by the grouping operation.default TableapplyToAllBy(String formulaColumn, String columnParamName, Collection<? extends ColumnName> groupByColumns) Groups data according to groupByColumns and applies formulaColumn to each of columns not altered by the grouping operation.default TableapplyToAllBy(String formulaColumn, Collection<? extends ColumnName> groupByColumns) Groups data according to groupByColumns and applies formulaColumn to each of columns not altered by the grouping operation.default voidclose()Release resources held by this table, possibly destructively.default Tablecoalesce()Explicitly ensure that any work needed to make a table addressable, iterable, or queryable has been done, and return the coalesced child table if appropriate.default Tabledefault TableformatColumns(String... columnFormats) default TableformatColumnWhere(String columnName, String condition, String formula) default TableformatRowWhere(String condition, String formula) default <T> ColumnSource<T>getColumnSource(String sourceName, Class<? extends T> clazz) default <T> ColumnSource<T>getColumnSource(String sourceName, Class<? extends T> clazz, Class<?> componentType) Retrieves aColumnSourceandColumnSource.cast(Class, Class)casts} it to the target classclazzandcomponentType.default booleanhasColumns(String... columnNames) Determines whether this Table contains a column for each string in the specified array ofcolumnNames.default booleanhasColumns(Collection<String> columnNames) Determines whether this Table contains a column for each string in the specified collection ofcolumnNames.default TableheadBy(long nRows, Collection<String> groupByColumnNames) default booleanisEmpty()Returnstrueif this table has no rows (i.e.default Tablejoin(Table rightTable, Collection<? extends JoinMatch> columnsToMatch, Collection<? extends JoinAddition> columnsToAdd) Perform a cross join with therightTable.default Tablemeta()Provides column metadata in Table form.default TablemoveColumnsDown(String... columnsToMove) Produce a new table with the specified columns moved to the rightmost position.default TablemoveColumnsUp(String... columnsToMove) Produce a new table with the specified columns moved to the leftmost position.default intGet the number of columns defined for this table.default PartitionedTablepartitionBy(String... keyColumnNames) Equivalent topartitionBy(false, keyColumnNames)default voidAttempt to release cached resources held by this table.default TablerenameAllColumns(UnaryOperator<String> renameFunction) Produce a new table with the specified columns renamed using the provided function.default TablerenameColumns(String... pairs) Produce a new table with the specified columns renamed using the syntax"NewColumnName=OldColumnName".default RollupTablerollup(Collection<? extends Aggregation> aggregations) Create a rollup table.default RollupTablerollup(Collection<? extends Aggregation> aggregations, boolean includeConstituents) Create a rollup table.default RollupTablerollup(Collection<? extends Aggregation> aggregations, boolean includeConstituents, String... groupByColumns) Create a rollup table.default RollupTablerollup(Collection<? extends Aggregation> aggregations, String... groupByColumns) Create a rollup table.default RollupTablerollup(Collection<? extends Aggregation> aggregations, Collection<? extends ColumnName> groupByColumns) Create a rollup table.default Tabledefault longdefault TablesnapshotWhen(Table trigger, SnapshotWhenOptions.Flag... features) Creates a table that captures a snapshot ofthiswhenevertriggerupdates.default TablesnapshotWhen(Table trigger, Collection<SnapshotWhenOptions.Flag> features, String... stampColumns) Creates a table that captures a snapshot ofthiswhenevertriggerupdates.default TabletailBy(long nRows, Collection<String> groupByColumnNames) default TablewouldMatch(String... expressions) Methods inherited from interface io.deephaven.engine.table.AttributeMap
getAttribute, getAttributeKeys, getAttributes, getAttributes, hasAttribute, retainingAttributes, withAttributes, withAttributes, withoutAttributesMethods inherited from interface io.deephaven.engine.updategraph.DynamicNode
addParentReference, setRefreshingMethods 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.base.log.LogOutputAppendable
appendMethods inherited from interface io.deephaven.util.datastructures.LongSizedDataStructure
intSize, intSize, sizeMethods inherited from interface io.deephaven.engine.updategraph.NotificationQueue.Dependency
getUpdateGraph, getUpdateGraph, satisfiedMethods inherited from interface io.deephaven.engine.util.systemicmarking.SystemicObject
isSystemicObject, markSystemicMethods inherited from interface io.deephaven.engine.table.Table
addUpdateListener, addUpdateListener, addUpdateListener, apply, assertAddOnly, assertAppendOnly, assertBlink, awaitUpdate, awaitUpdate, byteColumnIterator, characterColumnIterator, columnIterator, doubleColumnIterator, flatten, floatColumnIterator, getColumnSource, getColumnSourceMap, getColumnSources, getDefinition, getDescription, getRowSet, getSubTable, headBy, headPct, integerColumnIterator, isFailed, isFlat, isRefreshing, longColumnIterator, moveColumns, objectColumnIterator, objectColumnIterator, partitionBy, partitionedAggBy, removeBlink, removeUpdateListener, removeUpdateListener, renameColumns, rollup, setTotalsTable, shortColumnIterator, slicePct, tailBy, tailPct, tree, withKeys, withUniqueKeys, wouldMatchMethods inherited from interface io.deephaven.api.TableOperations
aggAllBy, aggBy, asOfJoin, dropColumns, exactJoin, head, join, lazyUpdate, naturalJoin, rangeJoin, reverse, select, selectDistinct, slice, snapshot, snapshotWhen, sort, tail, ungroup, update, updateBy, updateView, view, where, whereIn, whereNotInMethods 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, 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
-
ZERO_LENGTH_TABLE_ARRAY
-
-
Method Details
-
coalesce
Description copied from interface:TableExplicitly ensure that any work needed to make a table addressable, iterable, or queryable has been done, and return the coalesced child table if appropriate. -
meta
Description copied from interface:TableProvides column metadata in Table form. -
numColumns
Description copied from interface:TableGet the number of columns defined for this table. Equivalent togetDefinition().getColumns().length.- Specified by:
numColumnsin interfaceTable- Returns:
- The number of columns defined for this table
-
hasColumns
Description copied from interface:TableDetermines whether this Table contains a column for each string in the specified array ofcolumnNames.- Specified by:
hasColumnsin interfaceTable- Parameters:
columnNames- The array of column names to be checked for inclusion in this table. Must not benull.- Returns:
trueif this Table contains a column for each and every string in thecolumnNamesarray;falseif any element ofcolumnNamesis not the name of a column in this table
-
hasColumns
Description copied from interface:TableDetermines whether this Table contains a column for each string in the specified collection ofcolumnNames.- Specified by:
hasColumnsin interfaceTable- Parameters:
columnNames- The collection of column names to be checked for inclusion in this table. Must not benull.- Returns:
trueif this Table contains a column for each and every string in thecolumnNamescollection;falseif any element ofcolumnNamesis not the name of a column in this table
-
sizeForInstrumentation
default long sizeForInstrumentation()- Specified by:
sizeForInstrumentationin interfaceTable- Returns:
Sizeif it is currently known without subsequent steps to coalesce the Table, elsenull
-
isEmpty
Description copied from interface:TableReturnstrueif this table has no rows (i.e.size() == 0). -
getColumnSource
@FinalDefault default <T> ColumnSource<T> getColumnSource(String sourceName, Class<? extends T> clazz) Description copied from interface:TableRetrieves aColumnSourceandcastsit to the target classclazz.The success of this call is equivalent to
getDefinition().checkColumn(sourceName, clazz), which is the preferred way to check for compatibility in scenarios where the caller does not want to the implementation to potentially invokeTable.coalesce().- Specified by:
getColumnSourcein interfaceTable- Type Parameters:
T- The target type, as a type parameter. Intended to be inferred fromclazz.- Parameters:
sourceName- The name of the columnclazz- The target type- Returns:
- The column source for
sourceName, parameterized byT - See Also:
-
getColumnSource
@FinalDefault default <T> ColumnSource<T> getColumnSource(String sourceName, Class<? extends T> clazz, @Nullable Class<?> componentType) Description copied from interface:TableRetrieves aColumnSourceandColumnSource.cast(Class, Class)casts} it to the target classclazzandcomponentType.The success of this call is equivalent to
getDefinition().checkColumn(sourceName, clazz, componentType), which is the preferred way to check for compatibility in scenarios where the caller does not want the implementation to potentially invokeTable.coalesce().- Specified by:
getColumnSourcein interfaceTable- Type Parameters:
T- The target type, as a type parameter. Intended to be inferred fromclazz.- Parameters:
sourceName- The name of the columnclazz- The target typecomponentType- The target component type, may be null- Returns:
- The column source for
sourceName, parameterized byT - See Also:
-
wouldMatch
- Specified by:
wouldMatchin interfaceTable
-
selectDistinct
- Specified by:
selectDistinctin interfaceTableOperations<Table,Table>
-
dropColumnFormats
- Specified by:
dropColumnFormatsin interfaceTable
-
renameColumns
Description copied from interface:TableProduce a new table with the specified columns renamed using the syntax"NewColumnName=OldColumnName". The renames are simultaneous and unordered, enabling direct swaps between column names. The resulting table retains the original column ordering after applying the specified renames.NOTE: If a new column name conflicts with an existing column name in the table, the existing column will be silently replaced.
IllegalArgumentExceptionwill be thrown:- if a source column does not exist
- if a source column is used more than once
- if a destination column is used more than once
- Specified by:
renameColumnsin interfaceTable- Parameters:
pairs- The columns to rename- Returns:
- The new table, with the columns renamed
-
renameAllColumns
Description copied from interface:TableProduce a new table with the specified columns renamed using the provided function. The renames are simultaneous and unordered, enabling direct swaps between column names. The resulting table retains the original column ordering after applying the specified renames.NOTE: If a new column name conflicts with an existing column name in the table, the existing column will be silently replaced.
IllegalArgumentExceptionwill be thrown:- if a destination column is used more than once
- Specified by:
renameAllColumnsin interfaceTable- Parameters:
renameFunction- The function to apply to each column name- Returns:
- The new table, with the columns renamed
-
formatRowWhere
- Specified by:
formatRowWherein interfaceTable
-
formatColumnWhere
@ConcurrentMethod @FinalDefault default Table formatColumnWhere(String columnName, String condition, String formula) - Specified by:
formatColumnWherein interfaceTable
-
formatColumns
- Specified by:
formatColumnsin interfaceTable
-
moveColumnsUp
Description copied from interface:TableProduce a new table with the specified columns moved to the leftmost position. Columns can be renamed with the usual syntax, i.e."NewColumnName=OldColumnName"). The renames are simultaneous and unordered, enabling direct swaps between column names. All other columns are left in their original order.IllegalArgumentExceptionwill be thrown:- if a source column does not exist
- if a source column is used more than once
- if a destination column is used more than once
- Specified by:
moveColumnsUpin interfaceTable- Parameters:
columnsToMove- The columns to move to the left (and, optionally, to rename)- Returns:
- The new table, with the columns rearranged as explained above
-
moveColumnsDown
Description copied from interface:TableProduce a new table with the specified columns moved to the rightmost position. Columns can be renamed with the usual syntax, i.e."NewColumnName=OldColumnName"). The renames are simultaneous and unordered, enabling direct swaps between column names. All other columns are left in their original order.IllegalArgumentExceptionwill be thrown:- if a source column does not exist
- if a source column is used more than once
- if a destination column is used more than once
- Specified by:
moveColumnsDownin interfaceTable- Parameters:
columnsToMove- The columns to move to the right (and, optionally, to rename)- Returns:
- The new table, with the columns rearranged as explained above
-
join
@FinalDefault default Table join(Table rightTable, Collection<? extends JoinMatch> columnsToMatch, Collection<? extends JoinAddition> columnsToAdd) Description copied from interface:TableOperationsPerform a cross join with therightTable.Delegates to
TableOperations.join(Object, Collection, Collection, int).- Specified by:
joinin interfaceTableOperations<Table,Table> - Parameters:
rightTable- The right side table on the join.columnsToMatch- The match pair conditions.columnsToAdd- The columns from the right side that need to be added to the left side as a result of the match.- Returns:
- a new table joined according to the specification in columnsToMatch and columnsToAdd
-
headBy
-
tailBy
-
applyToAllBy
@ConcurrentMethod @FinalDefault default Table applyToAllBy(String formulaColumn, String columnParamName, Collection<? extends ColumnName> groupByColumns) Description copied from interface:TableGroups data according to groupByColumns and applies formulaColumn to each of columns not altered by the grouping operation.columnParamNameis used as place-holder for the name of each column insideformulaColumn.- Specified by:
applyToAllByin interfaceTable- Parameters:
formulaColumn- Formula applied to each columncolumnParamName- The parameter name used as a placeholder for each columngroupByColumns- The grouping columns as inTableOperations.groupBy(Collection)
-
applyToAllBy
@ConcurrentMethod @FinalDefault default Table applyToAllBy(String formulaColumn, Collection<? extends ColumnName> groupByColumns) Description copied from interface:TableGroups data according to groupByColumns and applies formulaColumn to each of columns not altered by the grouping operation.- Specified by:
applyToAllByin interfaceTable- Parameters:
formulaColumn- Formula applied to each column, uses parameter each to refer to each colum it being applied togroupByColumns- The grouping columns as inTableOperations.groupBy(Collection)
-
applyToAllBy
@ConcurrentMethod @FinalDefault default Table applyToAllBy(String formulaColumn, String... groupByColumns) Description copied from interface:TableGroups data according to groupByColumns and applies formulaColumn to each of columns not altered by the grouping operation.- Specified by:
applyToAllByin interfaceTable- Parameters:
formulaColumn- Formula applied to each column, uses parameter each to refer to each colum it being applied togroupByColumns- The grouping columns as inTableOperations.groupBy()
-
partitionBy
Description copied from interface:TableEquivalent topartitionBy(false, keyColumnNames)Create a
PartitionedTablefrom this table, partitioned according to the specified key columns. Key columns are never dropped from the output constituent tables.The underlying partitioned table backing the result contains each row in
thistable in exactly one of the result's constituent tables.- Specified by:
partitionByin interfaceTable- Parameters:
keyColumnNames- The names of the key columns to partition by- Returns:
- A
PartitionedTablekeyed bykeyColumnNames
-
rollup
@ConcurrentMethod @FinalDefault default RollupTable rollup(Collection<? extends Aggregation> aggregations) Description copied from interface:TableCreate a rollup table.A rollup table aggregates all rows of the table.
-
rollup
@ConcurrentMethod @FinalDefault default RollupTable rollup(Collection<? extends Aggregation> aggregations, boolean includeConstituents) Description copied from interface:TableCreate a rollup table.A rollup table aggregates all rows of the table.
-
rollup
@ConcurrentMethod @FinalDefault default RollupTable rollup(Collection<? extends Aggregation> aggregations, String... groupByColumns) Description copied from interface:TableCreate a rollup table.A rollup table aggregates by the specified columns, and then creates a hierarchical table which re-aggregates using one less aggregation column on each level. The column that is no longer part of the aggregation key is replaced with null on each level.
-
rollup
@ConcurrentMethod @FinalDefault default RollupTable rollup(Collection<? extends Aggregation> aggregations, boolean includeConstituents, String... groupByColumns) Description copied from interface:TableCreate a rollup table.A rollup table aggregates by the specified columns, and then creates a hierarchical table which re-aggregates using one less aggregation column on each level. The column that is no longer part of the aggregation key is replaced with null on each level.
-
rollup
@ConcurrentMethod @FinalDefault default RollupTable rollup(Collection<? extends Aggregation> aggregations, Collection<? extends ColumnName> groupByColumns) Description copied from interface:TableCreate a rollup table.A rollup table aggregates by the specified columns, and then creates a hierarchical table which re-aggregates using one less aggregation column on each level. The column that is no longer part of the aggregation key is replaced with null on each level.
-
snapshotWhen
Description copied from interface:TableOperationsCreates a table that captures a snapshot ofthiswhenevertriggerupdates.Equivalent to
snapshotWhen(trigger, SnapshotWhenControl.of(features)).- Specified by:
snapshotWhenin interfaceTableOperations<Table,Table> - Parameters:
trigger- the trigger tablefeatures- the snapshot features- Returns:
- the snapshotting table
- See Also:
-
snapshotWhen
@FinalDefault default Table snapshotWhen(Table trigger, Collection<SnapshotWhenOptions.Flag> features, String... stampColumns) Description copied from interface:TableOperationsCreates a table that captures a snapshot ofthiswhenevertriggerupdates.Equivalent to
snapshotWhen(trigger, SnapshotWhenControl.of(features, stampColumns)).See
SnapshotWhenOptionsfor details on thestampColumns.- Specified by:
snapshotWhenin interfaceTableOperations<Table,Table> - Parameters:
trigger- the trigger tablefeatures- the snapshot featuresstampColumns- the stamp columns- Returns:
- the snapshotting table
- See Also:
-
close
Description copied from interface:TableRelease resources held by this table, possibly destructively. This may render the table unsuitable or unsafe for further use. -
releaseCachedResources
default void releaseCachedResources()Description copied from interface:TableAttempt to release cached resources held by this table. UnlikeTable.close(), this must not render the table unusable for subsequent read operations. Implementations should be sure to callsuper.releaseCachedResources().- Specified by:
releaseCachedResourcesin interfaceTable
-
addUpdateListener
Description copied from interface:TableSubscribe for updates to this table.listenerwill be invoked via theNotificationQueueassociated with this Table.- Specified by:
addUpdateListenerin interfaceTable- Parameters:
listener- listener for updates
-