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
,InitialSnapshotTable
,InMemoryTable
,KeyedArrayBackedInputTable
,PartitionAwareSourceTable
,QueryReplayGroupedTable
,QueryTable
,QueryTable.FilteredTable
,RedefinableTable
,ReplayGroupedFullTable
,ReplayLastByGroupedTable
,ReplayTable
,ReplayTableBase
,SimpleSourceTable
,SourceTable
,TimeTable
,UncoalescedTable
,UpdatableTable
,UpdateSourceQueryTable
Table
.-
Field Summary
Fields inherited from interface io.deephaven.engine.table.GridAttributes
COLUMN_DESCRIPTIONS_ATTRIBUTE, DESCRIPTION_ATTRIBUTE, LAYOUT_HINTS_ATTRIBUTE, SORTABLE_COLUMNS_ATTRIBUTE
Fields inherited from interface io.deephaven.engine.table.Table
ADD_ONLY_TABLE_ATTRIBUTE, AGGREGATION_ROW_LOOKUP_ATTRIBUTE, APPEND_ONLY_TABLE_ATTRIBUTE, BARRAGE_PERFORMANCE_KEY_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, SORTED_COLUMNS_ATTRIBUTE, SYSTEMIC_TABLE_ATTRIBUTE, TEST_SOURCE_TABLE_ATTRIBUTE, TOTALS_TABLE_ATTRIBUTE, UNIQUE_KEYS_ATTRIBUTE
Fields inherited from interface io.deephaven.api.TableOperations
AGG_BY_PRESERVE_EMPTY_DEFAULT
Fields inherited from interface io.deephaven.api.TableOperationsDefaults
ZERO_LENGTH_COLUMNNAME_ARRAY, ZERO_LENGTH_FILTER_ARRAY
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
addUpdateListener
(ShiftObliviousListener listener) Subscribe for updates to this table.default Table
applyToAllBy
(String formulaColumn, String... groupByColumns) Groups data according to groupByColumns and applies formulaColumn to each of columns not altered by the grouping operation.default Table
applyToAllBy
(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 Table
applyToAllBy
(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 void
close()
Release resources held by this table, possibly destructively.default Table
coalesce()
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 Table
default Table
formatColumns
(String... columnFormats) default Table
formatColumnWhere
(String columnName, String condition, String formula) default Table
formatRowWhere
(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 aColumnSource
andColumnSource.cast(Class, Class)
casts} it to the target classclazz
andcomponentType
.default boolean
hasColumns
(String... columnNames) Determines whether this Table contains a column for each string in the specified array ofcolumnNames
.default boolean
hasColumns
(Collection<String> columnNames) Determines whether this Table contains a column for each string in the specified collection ofcolumnNames
.default Table
headBy
(long nRows, Collection<String> groupByColumnNames) default boolean
isEmpty()
Returnstrue
if this table has no rows (i.e.default Table
join
(Table rightTable, Collection<? extends JoinMatch> columnsToMatch, Collection<? extends JoinAddition> columnsToAdd) Perform a cross join with therightTable
.default Table
meta()
Provides column metadata in Table form.default Table
moveColumnsDown
(String... columnsToMove) Produce a new table with the specified columns moved to the rightmost position.default Table
moveColumnsUp
(String... columnsToMove) Produce a new table with the specified columns moved to the leftmost position.default int
Get the number of columns defined for this table.default PartitionedTable
partitionBy
(String... keyColumnNames) Equivalent topartitionBy(false, keyColumnNames)
default void
Attempt to release cached resources held by this table.default Table
renameAllColumns
(UnaryOperator<String> renameFunction) Produce a new table with the specified columns renamed using the provided function.default Table
renameColumns
(String... pairs) Produce a new table with the specified columns renamed using the syntax"NewColumnName=OldColumnName"
.default RollupTable
rollup
(Collection<? extends Aggregation> aggregations) Create a rollup table.default RollupTable
rollup
(Collection<? extends Aggregation> aggregations, boolean includeConstituents) Create a rollup table.default RollupTable
rollup
(Collection<? extends Aggregation> aggregations, boolean includeConstituents, String... groupByColumns) Create a rollup table.default RollupTable
rollup
(Collection<? extends Aggregation> aggregations, String... groupByColumns) Create a rollup table.default RollupTable
rollup
(Collection<? extends Aggregation> aggregations, Collection<? extends ColumnName> groupByColumns) Create a rollup table.default Table
default long
default Table
snapshotWhen
(Table trigger, SnapshotWhenOptions.Flag... features) Creates a table that captures a snapshot ofthis
whenevertrigger
updates.default Table
snapshotWhen
(Table trigger, Collection<SnapshotWhenOptions.Flag> features, String... stampColumns) Creates a table that captures a snapshot ofthis
whenevertrigger
updates.default Table
tailBy
(long nRows, Collection<String> groupByColumnNames) default Table
wouldMatch
(String... expressions) Methods inherited from interface io.deephaven.engine.table.AttributeMap
getAttribute, getAttributeKeys, getAttributes, getAttributes, hasAttribute, retainingAttributes, withAttributes, withAttributes, withoutAttributes
Methods inherited from interface io.deephaven.engine.updategraph.DynamicNode
addParentReference, setRefreshing
Methods inherited from interface io.deephaven.engine.table.GridAttributes
clearSortingRestrictions, restrictSortTo, setLayoutHints, withColumnDescription, withColumnDescriptions, withDescription
Methods inherited from interface io.deephaven.engine.liveness.LivenessManager
manage, tryManage
Methods inherited from interface io.deephaven.engine.liveness.LivenessNode
tryUnmanage, tryUnmanage, unmanage, unmanage
Methods inherited from interface io.deephaven.engine.liveness.LivenessReferent
dropReference, getReferentDescription, getWeakReference, retainReference, tryRetainReference
Methods inherited from interface io.deephaven.base.log.LogOutputAppendable
append
Methods inherited from interface io.deephaven.util.datastructures.LongSizedDataStructure
intSize, intSize, size
Methods inherited from interface io.deephaven.engine.updategraph.NotificationQueue.Dependency
getUpdateGraph, getUpdateGraph, satisfied
Methods inherited from interface io.deephaven.engine.util.systemicmarking.SystemicObject
isSystemicObject, markSystemic
Methods inherited from interface io.deephaven.engine.table.Table
addUpdateListener, addUpdateListener, addUpdateListener, apply, awaitUpdate, awaitUpdate, byteColumnIterator, characterColumnIterator, columnIterator, doubleColumnIterator, flatten, floatColumnIterator, getColumnSource, getColumnSourceMap, getColumnSources, getDefinition, getDescription, getRowSet, getSubTable, headBy, headPct, integerColumnIterator, isFailed, isFlat, isRefreshing, longColumnIterator, moveColumns, objectColumnIterator, partitionBy, partitionedAggBy, removeBlink, removeUpdateListener, removeUpdateListener, renameColumns, rollup, setTotalsTable, shortColumnIterator, slice, slicePct, tailBy, tailPct, tree, withKeys, withUniqueKeys, wouldMatch
Methods inherited from interface io.deephaven.api.TableOperations
aggAllBy, aggBy, asOfJoin, dropColumns, exactJoin, head, join, lazyUpdate, naturalJoin, rangeJoin, reverse, select, selectDistinct, snapshot, snapshotWhen, sort, tail, ungroup, update, updateBy, updateView, view, where, whereIn, whereNotIn
Methods 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, 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:Table
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. -
meta
Description copied from interface:Table
Provides column metadata in Table form. -
numColumns
Description copied from interface:Table
Get the number of columns defined for this table. Equivalent togetDefinition().getColumns().length
.- Specified by:
numColumns
in interfaceTable
- Returns:
- The number of columns defined for this table
-
hasColumns
Description copied from interface:Table
Determines whether this Table contains a column for each string in the specified array ofcolumnNames
.- Specified by:
hasColumns
in interfaceTable
- Parameters:
columnNames
- The array of column names to be checked for inclusion in this table. Must not benull
.- Returns:
true
if this Table contains a column for each and every string in thecolumnNames
array;false
if any element ofcolumnNames
is not the name of a column in this table
-
hasColumns
Description copied from interface:Table
Determines whether this Table contains a column for each string in the specified collection ofcolumnNames
.- Specified by:
hasColumns
in interfaceTable
- Parameters:
columnNames
- The collection of column names to be checked for inclusion in this table. Must not benull
.- Returns:
true
if this Table contains a column for each and every string in thecolumnNames
collection;false
if any element ofcolumnNames
is not the name of a column in this table
-
sizeForInstrumentation
default long sizeForInstrumentation()- Specified by:
sizeForInstrumentation
in interfaceTable
- Returns:
Size
if it is currently known without subsequent steps to coalesce the Table, elsenull
-
isEmpty
Description copied from interface:Table
Returnstrue
if 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:Table
Retrieves aColumnSource
andcasts
it 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:
getColumnSource
in 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:Table
Retrieves aColumnSource
andColumnSource.cast(Class, Class)
casts} it to the target classclazz
andcomponentType
.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:
getColumnSource
in 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:
wouldMatch
in interfaceTable
-
selectDistinct
- Specified by:
selectDistinct
in interfaceTableOperations<Table,
Table>
-
dropColumnFormats
- Specified by:
dropColumnFormats
in interfaceTable
-
renameColumns
Description copied from interface:Table
Produce 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.IllegalArgumentException
will 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:
renameColumns
in interfaceTable
- Parameters:
pairs
- The columns to rename- Returns:
- The new table, with the columns renamed
-
renameAllColumns
Description copied from interface:Table
Produce 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.IllegalArgumentException
will be thrown:- if a destination column is used more than once
- Specified by:
renameAllColumns
in interfaceTable
- Parameters:
renameFunction
- The function to apply to each column name- Returns:
- The new table, with the columns renamed
-
formatRowWhere
- Specified by:
formatRowWhere
in interfaceTable
-
formatColumnWhere
@ConcurrentMethod @FinalDefault default Table formatColumnWhere(String columnName, String condition, String formula) - Specified by:
formatColumnWhere
in interfaceTable
-
formatColumns
- Specified by:
formatColumns
in interfaceTable
-
moveColumnsUp
Description copied from interface:Table
Produce 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.IllegalArgumentException
will 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:
moveColumnsUp
in 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:Table
Produce 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.IllegalArgumentException
will 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:
moveColumnsDown
in 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:TableOperations
Perform a cross join with therightTable
.Delegates to
TableOperations.join(Object, Collection, Collection, int)
.- Specified by:
join
in 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:Table
Groups data according to groupByColumns and applies formulaColumn to each of columns not altered by the grouping operation.columnParamName
is used as place-holder for the name of each column insideformulaColumn
.- Specified by:
applyToAllBy
in 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:Table
Groups data according to groupByColumns and applies formulaColumn to each of columns not altered by the grouping operation.- Specified by:
applyToAllBy
in 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:Table
Groups data according to groupByColumns and applies formulaColumn to each of columns not altered by the grouping operation.- Specified by:
applyToAllBy
in 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:Table
Equivalent topartitionBy(false, keyColumnNames)
Create a
PartitionedTable
from 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
this
table in exactly one of the result's constituent tables.- Specified by:
partitionBy
in interfaceTable
- Parameters:
keyColumnNames
- The names of the key columns to partition by- Returns:
- A
PartitionedTable
keyed bykeyColumnNames
-
rollup
@ConcurrentMethod @FinalDefault default RollupTable rollup(Collection<? extends Aggregation> aggregations) Description copied from interface:Table
Create 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:Table
Create 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:Table
Create 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:Table
Create 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:Table
Create 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:TableOperations
Creates a table that captures a snapshot ofthis
whenevertrigger
updates.Equivalent to
snapshotWhen(trigger, SnapshotWhenControl.of(features))
.- Specified by:
snapshotWhen
in 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:TableOperations
Creates a table that captures a snapshot ofthis
whenevertrigger
updates.Equivalent to
snapshotWhen(trigger, SnapshotWhenControl.of(features, stampColumns))
.See
SnapshotWhenOptions
for details on thestampColumns
.- Specified by:
snapshotWhen
in 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:Table
Release 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:Table
Attempt 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:
releaseCachedResources
in interfaceTable
-
addUpdateListener
Description copied from interface:Table
Subscribe for updates to this table.listener
will be invoked via theNotificationQueue
associated with this Table.- Specified by:
addUpdateListener
in interfaceTable
- Parameters:
listener
- listener for updates
-