Interface Table
- All Superinterfaces:
DynamicNode
,LivenessManager
,LivenessNode
,LivenessReferent
,LogOutputAppendable
,LongSizedDataStructure
,NotificationQueue.Dependency
,SystemicObject
,TableOperations<Table,Table>
- All Known Subinterfaces:
LazySnapshotTable
,TableWithDefaults
- All Known Implementing Classes:
AppendOnlyArrayBackedMutableTable
,BarrageRedirectedTable
,BarrageStreamTable
,BarrageTable
,BaseTable
,DeferredViewTable
,HierarchicalTable
,InitialSnapshotTable
,InMemoryTable
,KeyedArrayBackedMutableTable
,PartitionAwareSourceTable
,QueryReplayGroupedTable
,QueryTable
,QueryTable.FilteredTable
,RedefinableTable
,ReplayGroupedFullTable
,ReplayLastByGroupedTable
,ReplayTable
,SimpleSourceTable
,SourceTable
,TimeTable
,UncoalescedTable
,UpdatableTable
,UpdateSourceQueryTable
public interface Table extends LongSizedDataStructure, LivenessNode, NotificationQueue.Dependency, DynamicNode, SystemicObject, TableOperations<Table,Table>
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
Table.AsOfMatchRule
Rules for the inexact matching performed on the final column to match by inaj(io.deephaven.engine.table.Table, io.deephaven.engine.table.MatchPair[], io.deephaven.engine.table.MatchPair[], io.deephaven.engine.table.Table.AsOfMatchRule)
andraj(io.deephaven.engine.table.Table, io.deephaven.engine.table.MatchPair[], io.deephaven.engine.table.MatchPair[], io.deephaven.engine.table.Table.AsOfMatchRule)
. -
Field Summary
Fields Modifier and Type Field Description static String
ADD_ONLY_TABLE_ATTRIBUTE
static String
BARRAGE_PERFORMANCE_KEY_ATTRIBUTE
Set this attribute to enable collection of barrage performance stats.static String
COLUMN_DESCRIPTIONS_ATTRIBUTE
static String
COLUMN_RENDERERS_ATTRIBUTE
static String
EMPTY_SOURCE_TABLE_ATTRIBUTE
This attribute is applied to source tables, and takes on Boolean values.static String
FILTERABLE_COLUMNS_ATTRIBUTE
static String
HIERARCHICAL_CHILDREN_TABLE_MAP_ATTRIBUTE
static String
HIERARCHICAL_SOURCE_INFO_ATTRIBUTE
static String
HIERARCHICAL_SOURCE_TABLE_ATTRIBUTE
static String
INPUT_TABLE_ATTRIBUTE
static String
KEY_COLUMNS_ATTRIBUTE
static String
LAYOUT_HINTS_ATTRIBUTE
static String
MERGED_TABLE_ATTRIBUTE
This attribute is used internally by TableTools.merge to detect successive merges.static String
NON_DISPLAY_TABLE
Set this attribute for tables that should not be displayed in the UI.static String
PLUGIN_NAME
Set this attribute to load a plugin for this table in the Web Clientstatic String
PREDEFINED_ROLLUP_ATTRIBUTE
static String
PREPARED_RLL_ATTRIBUTE
static String
PREVIEW_PARENT_TABLE
This attribute stores a reference to a table that is the parent table for a Preview Table.static String
REVERSE_LOOKUP_ATTRIBUTE
static String
ROLLUP_LEAF_ATTRIBUTE
static String
SNAPSHOT_VIEWPORT_TYPE
static String
SORTABLE_COLUMNS_ATTRIBUTE
static String
SORTED_COLUMNS_ATTRIBUTE
The query engine may set or read this attribute to determine if a table is sorted by a particular column.static String
STREAM_TABLE_ATTRIBUTE
If this attribute is present with valuetrue
, this Table is a "stream table".static String
SYSTEMIC_TABLE_ATTRIBUTE
static String
TABLE_DESCRIPTION_ATTRIBUTE
static String
TOTALS_TABLE_ATTRIBUTE
static String
TREE_TABLE_FILTER_REVERSE_LOOKUP_ATTRIBUTE
static String
UNIQUE_KEYS_ATTRIBUTE
-
Method Summary
Modifier and Type Method Description Table
absSumBy()
Produces a single row table with the absolute sum of each column.Table
absSumBy(Selectable... groupByColumns)
Groups the data column according togroupByColumns
and computes the sum of the absolute values for the rest of the fieldsTable
absSumBy(String... groupByColumns)
Groups the data column according togroupByColumns
and computes the sum of the absolute values for the rest of the fieldsTable
absSumBy(Collection<String> groupByColumns)
Groups the data column according togroupByColumns
and computes the sum of the absolute values for the rest of the fieldsTable
aggAllBy(AggSpec spec)
Table
aggAllBy(AggSpec spec, Selectable... groupByColumns)
Table
aggAllBy(AggSpec spec, String... groupByColumns)
Table
aggAllBy(AggSpec spec, Collection<String> groupByColumns)
Table
aggBy(Aggregation aggregation)
Table
aggBy(Aggregation aggregation, String... groupByColumns)
Table
aggBy(Aggregation aggregation, Collection<? extends Selectable> groupByColumns)
Table
aggBy(Collection<? extends Aggregation> aggregations)
Table
aggBy(Collection<? extends Aggregation> aggregations, String... groupByColumns)
Table
aggBy(Collection<? extends Aggregation> aggregations, Collection<? extends Selectable> groupByColumns)
Table
aj(Table rightTable, MatchPair[] columnsToMatch, MatchPair[] columnsToAdd)
Looks up the columns in the rightTable that meet the match conditions in the columnsToMatch list.Table
aj(Table rightTable, MatchPair[] columnsToMatch, MatchPair[] columnsToAdd, Table.AsOfMatchRule asOfMatchRule)
Looks up the columns in the rightTable that meet the match conditions in the columnsToMatch list.Table
aj(Table rightTable, String columnsToMatch)
Perform an as-of join with therightTable
.Table
aj(Table rightTable, String columnsToMatch, String columnsToAdd)
Perform an as-of join with therightTable
.Table
aj(Table rightTable, Collection<? extends JoinMatch> columnsToMatch, Collection<? extends JoinAddition> columnsToAdd)
Perform an as-of join with therightTable
.Table
aj(Table rightTable, Collection<? extends JoinMatch> columnsToMatch, Collection<? extends JoinAddition> columnsToAdd, AsOfJoinRule asOfJoinRule)
Perform an as-of join with therightTable
.Table
aj(Table rightTable, Collection<String> columnsToMatch)
Looks up the columns in the rightTable that meet the match conditions in the columnsToMatch list.<R> R
apply(Function<Table,R> function)
Applies a function to this table.Table
applyToAllBy(String formulaColumn, String... groupByColumns)
Groups data according to groupByColumns and applies formulaColumn to each of columns not altered by the grouping operation.Table
applyToAllBy(String formulaColumn, String columnParamName, Collection<? extends Selectable> groupByColumns)
Groups data according to groupByColumns and applies formulaColumn to each of columns not altered by the grouping operation.Table
applyToAllBy(String formulaColumn, Collection<? extends Selectable> groupByColumns)
Groups data according to groupByColumns and applies formulaColumn to each of columns not altered by the grouping operation.Table
avgBy()
Produces a single row table with the average of each column.Table
avgBy(Selectable... groupByColumns)
Groups the data column according togroupByColumns
and computes the average for the rest of the fieldsTable
avgBy(String... groupByColumns)
Groups the data column according togroupByColumns
and computes the average for the rest of the fieldsTable
avgBy(Collection<String> groupByColumns)
Groups the data column according togroupByColumns
and computes the average for the rest of the fieldsvoid
awaitUpdate()
Wait for updates to this Table.boolean
awaitUpdate(long timeout)
Wait for updates to this Table.ByteColumnIterator
byteColumnIterator(String columnName)
CharacterColumnIterator
characterColumnIterator(String columnName)
Table
clearSortingRestrictions()
Clear all sorting restrictions that was applied to the current table.void
close()
Release resources held by this table, possibly destructively.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.<TYPE> Iterator<TYPE>
columnIterator(String columnName)
Table
countBy(String countColumnName)
Table
countBy(String countColumnName, Selectable... groupByColumns)
Table
countBy(String countColumnName, String... groupByColumns)
Table
countBy(String countColumnName, Collection<String> groupByColumns)
Table
dateTimeColumnAsNanos(String columnName)
Table
dateTimeColumnAsNanos(String dateTimeColumnName, String nanosColumnName)
Produce a new table with the same columns as this table, but with a new column presenting the specified DateTime column as a Long column (with each DateTime represented instead as the corresponding number of nanos since the epoch).DoubleColumnIterator
doubleColumnIterator(String columnName)
Table
dropColumnFormats()
Table
dropColumns(String... columnNames)
Table
dropColumns(Collection<String> columnNames)
Table
dropStream()
If this table is a stream table, i.e.Table
exactJoin(Table rightTable, MatchPair[] columnsToMatch, MatchPair[] columnsToAdd)
Table
exactJoin(Table rightTable, String columnsToMatch)
Perform an exact-join with therightTable
.Table
exactJoin(Table rightTable, String columnsToMatch, String columnsToAdd)
Perform an exact-join with therightTable
.Table
exactJoin(Table rightTable, Collection<? extends JoinMatch> columnsToMatch, Collection<? extends JoinAddition> columnsToAdd)
Perform an exact-join with therightTable
.Table
firstBy()
Returns the first row of the given table.Table
firstBy(Selectable... groupByColumns)
Groups the data column according togroupByColumns
and retrieves the first for the rest of the fieldsTable
firstBy(String... groupByColumns)
Groups the data column according togroupByColumns
and retrieves the first for the rest of the fieldsTable
firstBy(Collection<String> groupByColumns)
Groups the data column according togroupByColumns
and retrieves the first for the rest of the fieldsTable
flatten()
Creates a version of this table with a flat RowSet.FloatColumnIterator
floatColumnIterator(String columnName)
Table
formatColumns(String... columnFormats)
Table
formatColumnWhere(String columnName, String condition, String formula)
Table
formatRowWhere(String condition, String formula)
Object
getAttribute(String key)
Get the value of the specified attribute.Set<String>
getAttributeNames()
Get a set of all the attributes that have values for this table.Map<String,Object>
getAttributes()
Get all attributes from this Table.Map<String,Object>
getAttributes(Collection<String> excluded)
Get all attributes from this Table except the items that appear inexcluded
.DataColumn
getColumn(int columnIndex)
DataColumn
getColumn(String columnName)
DataColumn[]
getColumns()
<T> ColumnSource<T>
getColumnSource(String sourceName)
Retrieves aColumnSource
.<T> ColumnSource<T>
getColumnSource(String sourceName, Class<? extends T> clazz)
Map<String,? extends ColumnSource<?>>
getColumnSourceMap()
Collection<? extends ColumnSource<?>>
getColumnSources()
TableDefinition
getDefinition()
String
getDescription()
Table
getMeta()
Provides column metadata in Table form.Object[]
getRecord(long rowNo, String... columnNames)
TrackingRowSet
getRowSet()
Table
getSubTable(TrackingRowSet rowSet)
Get aTable
that contains a sub-set of the rows fromthis
.Table
groupBy()
Table
groupBy(String... groupByColumns)
Table
groupBy(Collection<? extends Selectable> groupByColumns)
boolean
hasAttribute(String name)
Check if the specified attribute exists in this table.boolean
hasColumns(String... columnNames)
Determines whether this Table contains a column for each string in the specified array ofcolumnNames
.boolean
hasColumns(Collection<String> columnNames)
Determines whether this Table contains a column for each string in the specified collection ofcolumnNames
.Table
head(long size)
Table
headBy(long nRows, String... groupByColumnNames)
Table
headBy(long nRows, Collection<String> groupByColumnNames)
Table
headPct(double percent)
Provides a head that selects a dynamic number of rows based on a percent.IntegerColumnIterator
integerColumnIterator(String columnName)
boolean
isEmpty()
Returnstrue
if this table has no rows (i.e.boolean
isFailed()
boolean
isFlat()
Return true if this table is guaranteed to be flat.boolean
isRefreshing()
Is the node updating?Table
join(Table rightTable)
Perform a cross join with the right table.Table
join(Table rightTable, int numRightBitsToReserve)
Perform a cross join with the right table.Table
join(Table rightTable, MatchPair[] columnsToMatch, MatchPair[] columnsToAdd)
Perform a cross join with the right table.Table
join(Table rightTable, MatchPair[] columnsToMatch, MatchPair[] columnsToAdd, int numRightBitsToReserve)
Perform a cross join with the right table.Table
join(Table rightTable, String columnsToMatch)
Perform a cross join with therightTable
.Table
join(Table rightTable, String columnsToMatch, int numRightBitsToReserve)
Perform a cross join with the right table.Table
join(Table rightTable, String columnsToMatch, String columnsToAdd)
Perform a cross join with therightTable
.Table
join(Table rightTable, String columnsToMatch, String columnsToAdd, int numRightBitsToReserve)
Perform a cross join with the right table.Table
join(Table rightTable, Collection<? extends JoinMatch> columnsToMatch, Collection<? extends JoinAddition> columnsToAdd)
Perform a cross join with therightTable
.Table
join(Table rightTable, Collection<? extends JoinMatch> columnsToMatch, Collection<? extends JoinAddition> columnsToAdd, int numRightBitsToReserve)
Perform a cross join with therightTable
.Table
lastBy()
Returns the last row of the given table.Table
lastBy(Selectable... groupByColumns)
Groups the data column according togroupByColumns
and retrieves the last for the rest of the fieldsTable
lastBy(String... groupByColumns)
Groups the data column according togroupByColumns
and retrieves the last for the rest of the fieldsTable
lastBy(Collection<String> groupByColumns)
Groups the data column according togroupByColumns
and retrieves the last for the rest of the fieldsTable
lazyUpdate(Selectable... newColumns)
Table
lazyUpdate(String... newColumns)
Table
lazyUpdate(Collection<? extends Selectable> newColumns)
Compute column formulas on demand.void
listenForUpdates(ShiftObliviousListener listener)
Subscribe for updates to this table.void
listenForUpdates(ShiftObliviousListener listener, boolean replayInitialImage)
Subscribe for updates to this table.void
listenForUpdates(TableUpdateListener listener)
Subscribe for updates to this table.LongColumnIterator
longColumnIterator(String columnName)
Table
maxBy()
Produces a single row table with the maximum of each column.Table
maxBy(Selectable... groupByColumns)
Groups the data column according togroupByColumns
and computes the max for the rest of the fieldsTable
maxBy(String... groupByColumns)
Groups the data column according togroupByColumns
and computes the max for the rest of the fieldsTable
maxBy(Collection<String> groupByColumns)
Groups the data column according togroupByColumns
and computes the max for the rest of the fieldsTable
medianBy()
Produces a single row table with the median of each column.Table
medianBy(Selectable... groupByColumns)
Groups the data column according togroupByColumns
and computes the median for the rest of the fieldsTable
medianBy(String... groupByColumns)
Groups the data column according togroupByColumns
and computes the median for the rest of the fieldsTable
medianBy(Collection<String> groupByColumns)
Groups the data column according togroupByColumns
and computes the median for the rest of the fieldsTable
mergeAfter(Table... others)
Merge this Table withothers
.Table
mergeBefore(Table... others)
Merge this Table withothers
.Table
minBy()
Produces a single row table with the minimum of each column.Table
minBy(Selectable... groupByColumns)
Groups the data column according togroupByColumns
and computes the min for the rest of the fieldsTable
minBy(String... groupByColumns)
Groups the data column according togroupByColumns
and computes the min for the rest of the fieldsTable
minBy(Collection<String> groupByColumns)
Groups the data column according togroupByColumns
and computes the min for the rest of the fieldsTable
moveColumns(int index, boolean moveToEnd, String... columnsToMove)
Table
moveColumns(int index, String... columnsToMove)
Produce a new table with the specified columns moved to the specifiedindex
.Table
moveColumnsDown(String... columnsToMove)
Produce a new table with the specified columns moved to the rightmost position.Table
moveColumnsUp(String... columnsToMove)
Produce a new table with the specified columns moved to the leftmost position.Table
naturalJoin(Table rightTable, MatchPair[] columnsToMatch, MatchPair[] columnsToAdd)
Table
naturalJoin(Table rightTable, String columnsToMatch)
Perform an natural-join with therightTable
.Table
naturalJoin(Table rightTable, String columnsToMatch, String columnsToAdd)
Perform a natural-join with therightTable
.Table
naturalJoin(Table rightTable, Collection<? extends JoinMatch> columnsToMatch, Collection<? extends JoinAddition> columnsToAdd)
Perform an exact-join with therightTable
.int
numColumns()
Get the number of columns defined for this table.<DATA_TYPE>
ObjectColumnIterator<DATA_TYPE>objectColumnIterator(String columnName)
PartitionedTable
partitionBy(boolean dropKeys, String... keyColumnNames)
Create aPartitionedTable
from this table, partitioned according to the specified key columns.PartitionedTable
partitionBy(String... keyColumnNames)
Equivalent topartitionBy(false, keyColumnNames)
Table
raj(Table rightTable, MatchPair[] columnsToMatch, MatchPair[] columnsToAdd)
Just like .aj(), but the matching on the last column is in reverse order, so that you find the row after the given timestamp instead of the row before.Table
raj(Table rightTable, MatchPair[] columnsToMatch, MatchPair[] columnsToAdd, Table.AsOfMatchRule asOfMatchRule)
Just like .aj(), but the matching on the last column is in reverse order, so that you find the row after the given timestamp instead of the row before.Table
raj(Table rightTable, String columnsToMatch)
Perform an reverse-as-of join with therightTable
.Table
raj(Table rightTable, String columnsToMatch, String columnsToAdd)
Just like .aj(), but the matching on the last column is in reverse order, so that you find the row after the given timestamp instead of the row before.Table
raj(Table rightTable, Collection<? extends JoinMatch> columnsToMatch, Collection<? extends JoinAddition> columnsToAdd)
Perform a reverse-as-of join with therightTable
.Table
raj(Table rightTable, Collection<? extends JoinMatch> columnsToMatch, Collection<? extends JoinAddition> columnsToAdd, ReverseAsOfJoinRule reverseAsOfJoinRule)
Perform a reverse-as-of join with therightTable
.Table
raj(Table rightTable, Collection<String> columnsToMatch)
Just like .aj(), but the matching on the last column is in reverse order, so that you find the row after the given timestamp instead of the row before.void
releaseCachedResources()
Attempt to release cached resources held by this table.void
removeUpdateListener(ShiftObliviousListener listener)
Unsubscribe the supplied listener.void
removeUpdateListener(TableUpdateListener listener)
Unsubscribe the supplied listener.Table
renameAllColumns(UnaryOperator<String> renameFunction)
Table
renameColumns(MatchPair... pairs)
Table
renameColumns(String... columns)
Table
renameColumns(Collection<String> columns)
Table
restrictSortTo(String... allowedSortingColumns)
Disallow sorting on all but the specified columns.Table
reverse()
Table
rollup(Collection<? extends Aggregation> aggregations)
Create a rollup table.Table
rollup(Collection<? extends Aggregation> aggregations, boolean includeConstituents)
Create a rollup table.Table
rollup(Collection<? extends Aggregation> aggregations, boolean includeConstituents, Selectable... columns)
Table
rollup(Collection<? extends Aggregation> aggregations, boolean includeConstituents, String... columns)
Create a rollup table.Table
rollup(Collection<? extends Aggregation> aggregations, boolean includeConstituents, Collection<String> columns)
Create a rollup table.Table
rollup(Collection<? extends Aggregation> aggregations, Selectable... columns)
Create a rollup table.Table
rollup(Collection<? extends Aggregation> aggregations, String... columns)
Create a rollup table.Table
rollup(Collection<? extends Aggregation> aggregations, Collection<String> columns)
Create a rollup table.Table
select()
Table
select(Selectable... columns)
Table
select(String... columns)
Table
select(Collection<? extends Selectable> columns)
Table
selectDistinct()
Table
selectDistinct(Selectable... columns)
Table
selectDistinct(String... columns)
Table
selectDistinct(Collection<? extends Selectable> columns)
void
setAttribute(String key, Object object)
Set the value of an attribute.Table
setColumnRenderers(String directive)
Set renderers for columns.Table
setLayoutHints(String hints)
Set layout hints.Table
setTotalsTable(String directive)
Set a totals table for this Table.ShortColumnIterator
shortColumnIterator(String columnName)
long
sizeForInstrumentation()
Table
slice(long firstPositionInclusive, long lastPositionExclusive)
Extracts a subset of a table by row position.Table
snapshot(Table baseTable, boolean doInitialSnapshot, String... stampColumns)
SnapshotbaseTable
, triggered bythis
table, and return a new table as a result.Table
snapshot(Table baseTable, boolean doInitialSnapshot, Collection<ColumnName> stampColumns)
SnapshotbaseTable
, triggered bythis
table, and return a new table as a result.Table
snapshot(Table baseTable, String... stampColumns)
SnapshotbaseTable
, triggered bythis
table, and return a new table as a result.Table
snapshotHistory(Table rightTable)
Table
snapshotIncremental(Table rightTable, boolean doInitialSnapshot, String... stampColumns)
Table
snapshotIncremental(Table rightTable, String... stampColumns)
Table
sort(String... columnsToSortBy)
Table
sort(Collection<SortColumn> columnsToSortBy)
Table
sortDescending(String... columnsToSortBy)
Table
stdBy()
Produces a single row table with the standard deviation of each column.Table
stdBy(Selectable... groupByColumns)
Table
stdBy(String... groupByColumns)
Groups the data column according togroupByColumns
and computes the standard deviation for the rest of the fieldsTable
stdBy(Collection<String> groupByColumns)
Groups the data column according togroupByColumns
and computes the standard deviation for the rest of the fieldsTable
sumBy()
Produces a single row table with the sum of each column.Table
sumBy(Selectable... groupByColumns)
Groups the data column according togroupByColumns
and computes the sum for the rest of the fieldsTable
sumBy(String... groupByColumns)
Groups the data column according togroupByColumns
and computes the sum for the rest of the fieldsTable
sumBy(Collection<String> groupByColumns)
Groups the data column according togroupByColumns
and computes the sum for the rest of the fieldsTable
tail(long size)
Table
tailBy(long nRows, String... groupByColumnNames)
Table
tailBy(long nRows, Collection<String> groupByColumnNames)
Table
tailPct(double percent)
Table
treeTable(String idColumn, String parentColumn)
Create a hierarchical tree table.Table
ungroup()
Table
ungroup(boolean nullFill)
Table
ungroup(boolean nullFill, String... columnsToUngroup)
Ungroups a table by converting arrays into columns.Table
ungroup(String... columnsToUngroup)
Table
ungroupAllBut(String... columnsNotToUngroup)
Table
update(Selectable... newColumns)
Table
update(String... newColumns)
Table
update(Collection<? extends Selectable> newColumns)
Table
updateBy(UpdateByClause operation)
Create a table with the samerowSet
as its parent that will perform the specified set of row based operation to it.Table
updateBy(UpdateByClause operation, String... byColumns)
Create a table with the samerowSet
as its parent that will perform the specified row based operation to it.Table
updateBy(UpdateByControl control, Collection<? extends UpdateByClause> operations)
Create a table with the samerowSet
as its parent that will perform the specified set of row based operations to it.Table
updateBy(UpdateByControl control, Collection<? extends UpdateByClause> operations, Collection<? extends Selectable> byColumns)
Create a table with the samerowSet
as its parent that will perform the specified set of row based operations to it.Table
updateBy(Collection<? extends UpdateByClause> operations)
Create a table with the samerowSet
as its parent that will perform the specified set of row based operations to it.Table
updateBy(Collection<? extends UpdateByClause> operations, String... byColumns)
Create a table with the samerowSet
as its parent that will perform the specified set of row based operations to it.Table
updateBy(Collection<? extends UpdateByClause> operations, Collection<? extends Selectable> byColumns)
Create a table with the samerowSet
as its parent that will perform the specified set of row based operations to it.Table
updateView(Selectable... newColumns)
Table
updateView(String... newColumns)
Table
updateView(Collection<? extends Selectable> newColumns)
Table
varBy()
Produces a single row table with the variance of each column.Table
varBy(Selectable... groupByColumns)
Groups the data column according togroupByColumns
and computes the variance for the rest of the fieldsTable
varBy(String... groupByColumns)
Groups the data column according togroupByColumns
and computes the variance for the rest of the fieldsTable
varBy(Collection<String> groupByColumns)
Groups the data column according togroupByColumns
and computes the variance for the rest of the fieldsTable
view(Selectable... columns)
Table
view(String... columns)
Table
view(Collection<? extends Selectable> columns)
Table
wavgBy(String weightColumn)
Produces a single row table with the weighted average using weightColumn for the rest of the fieldsTable
wavgBy(String weightColumn, Selectable... groupByColumns)
Groups the data column according togroupByColumns
and computes the weighted average using weightColumn for the rest of the fieldsTable
wavgBy(String weightColumn, String... groupByColumns)
Groups the data column according togroupByColumns
and computes the weighted average using weightColumn for the rest of the fieldsTable
wavgBy(String weightColumn, Collection<String> groupByColumns)
Groups the data column according togroupByColumns
and computes the weighted average using weightColumn for the rest of the fieldsTable
where(Filter... filters)
Table
where(String... filters)
Table
where(Collection<? extends Filter> filters)
Table
whereIn(Table rightTable, String... columnsToMatch)
Filtersthis
table based on the set of values in therightTable
.Table
whereIn(Table rightTable, Collection<? extends JoinMatch> columnsToMatch)
Filtersthis
table based on the set of values in therightTable
.Table
whereNotIn(Table rightTable, String... columnsToMatch)
Filtersthis
table based on the set of values not in therightTable
.Table
whereNotIn(Table rightTable, Collection<? extends JoinMatch> columnsToMatch)
Filtersthis
table based on the set of values not in therightTable
.Table
withColumnDescription(String column, String description)
Add a description for a specific column.Table
withColumnDescription(Map<String,String> descriptions)
Add a set of column descriptions to the table.Table
withKeys(String... columns)
Set the table's key columns.Table
withTableDescription(String description)
Table
withUniqueKeys(String... columns)
Set the table's key columns and indicate that each key set will be unique.Table
wouldMatch(WouldMatchPair... matchers)
A table operation that applies the supplied predicate to each row in the table and produces columns containing the pass/fail result of the predicate application.Table
wouldMatch(String... expressions)
Table
wsumBy(String weightColumn)
Computes the weighted sum for all rows in the table using weightColumn for the rest of the fieldsTable
wsumBy(String weightColumn, Selectable... groupByColumns)
Groups the data column according togroupByColumns
and computes the weighted sum using weightColumn for the rest of the fieldsTable
wsumBy(String weightColumn, String... groupByColumns)
Groups the data column according togroupByColumns
and computes the weighted sum using weightColumn for the rest of the fieldsTable
wsumBy(String weightColumn, Collection<String> groupByColumns)
Groups the data column according togroupByColumns
and computes the weighted sum using weightColumn for the rest of the fieldsMethods inherited from interface io.deephaven.engine.updategraph.DynamicNode
addParentReference, setRefreshing
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
satisfied
Methods inherited from interface io.deephaven.engine.util.systemicmarking.SystemicObject
isSystemicObject, markSystemic
-
Field Details
-
INPUT_TABLE_ATTRIBUTE
- See Also:
- Constant Field Values
-
KEY_COLUMNS_ATTRIBUTE
- See Also:
- Constant Field Values
-
UNIQUE_KEYS_ATTRIBUTE
- See Also:
- Constant Field Values
-
SORTABLE_COLUMNS_ATTRIBUTE
- See Also:
- Constant Field Values
-
FILTERABLE_COLUMNS_ATTRIBUTE
- See Also:
- Constant Field Values
-
LAYOUT_HINTS_ATTRIBUTE
- See Also:
- Constant Field Values
-
TOTALS_TABLE_ATTRIBUTE
- See Also:
- Constant Field Values
-
TABLE_DESCRIPTION_ATTRIBUTE
- See Also:
- Constant Field Values
-
COLUMN_RENDERERS_ATTRIBUTE
- See Also:
- Constant Field Values
-
COLUMN_DESCRIPTIONS_ATTRIBUTE
- See Also:
- Constant Field Values
-
ADD_ONLY_TABLE_ATTRIBUTE
- See Also:
- Constant Field Values
-
STREAM_TABLE_ATTRIBUTE
If this attribute is present with value
true
, this Table is a "stream table".A stream table is a sequence of additions that represent rows newly received from a stream; on the cycle after the stream table is refreshed the rows are removed. Note that this means any particular row of data (not to be confused with a row key) never exists for more than one cycle.
Most operations are supported as normal on stream tables, but aggregation operations are treated specially, producing aggregate results that are valid over the entire observed stream from the time the operation is initiated. These semantics necessitate a few exclusions, i.e. unsupported operations that need to keep track of all rows:
groupBy(java.util.Collection<? extends io.deephaven.api.Selectable>)
is unsupportedaggBy(io.deephaven.api.agg.Aggregation)
is unsupported ifAggregation.AggGroup(String...)
is usedpartitionBy(boolean, java.lang.String...)
is unsupportedrollup()
is unsupported ifincludeConstituents == true
treeTable()
is unsupported
To disable these semantics, a
dropStream
method is offered.- See Also:
- Constant Field Values
-
SORTED_COLUMNS_ATTRIBUTE
The query engine may set or read this attribute to determine if a table is sorted by a particular column.- See Also:
- Constant Field Values
-
SYSTEMIC_TABLE_ATTRIBUTE
- See Also:
- Constant Field Values
-
ROLLUP_LEAF_ATTRIBUTE
- See Also:
- Constant Field Values
-
HIERARCHICAL_CHILDREN_TABLE_MAP_ATTRIBUTE
- See Also:
- Constant Field Values
-
HIERARCHICAL_SOURCE_TABLE_ATTRIBUTE
- See Also:
- Constant Field Values
-
TREE_TABLE_FILTER_REVERSE_LOOKUP_ATTRIBUTE
- See Also:
- Constant Field Values
-
HIERARCHICAL_SOURCE_INFO_ATTRIBUTE
- See Also:
- Constant Field Values
-
REVERSE_LOOKUP_ATTRIBUTE
- See Also:
- Constant Field Values
-
PREPARED_RLL_ATTRIBUTE
- See Also:
- Constant Field Values
-
PREDEFINED_ROLLUP_ATTRIBUTE
- See Also:
- Constant Field Values
-
SNAPSHOT_VIEWPORT_TYPE
- See Also:
- Constant Field Values
-
MERGED_TABLE_ATTRIBUTE
This attribute is used internally by TableTools.merge to detect successive merges. Its presence indicates that it is safe to decompose the table into its multiple constituent parts.- See Also:
- Constant Field Values
-
EMPTY_SOURCE_TABLE_ATTRIBUTE
This attribute is applied to source tables, and takes on Boolean values.
- True for post-
coalesce()
source tables and their children if the source table is empty. - False for post-
coalesce()
source tables and their children if the source table is non-empty. - Missing for all other tables.
- See Also:
- Constant Field Values
- True for post-
-
PREVIEW_PARENT_TABLE
This attribute stores a reference to a table that is the parent table for a Preview Table.- See Also:
- Constant Field Values
-
NON_DISPLAY_TABLE
Set this attribute for tables that should not be displayed in the UI.- See Also:
- Constant Field Values
-
PLUGIN_NAME
Set this attribute to load a plugin for this table in the Web Client- See Also:
- Constant Field Values
-
BARRAGE_PERFORMANCE_KEY_ATTRIBUTE
Set this attribute to enable collection of barrage performance stats.- See Also:
- Constant Field Values
-
-
Method Details
-
getDefinition
-
getMeta
Provides column metadata in Table form. Convenience method, behaves exactly the same as getDefinition().getColumnDefinitionsTable().- Returns:
- A Table of metadata about this Table's columns.
-
getDescription
-
numColumns
Get the number of columns defined for this table. Equivalent togetDefinition().getColumns().length
.- Returns:
- The number of columns defined for this table
-
hasColumns
Determines whether this Table contains a column for each string in the specified array ofcolumnNames
.- 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
Determines whether this Table contains a column for each string in the specified collection ofcolumnNames
.- 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
-
isRefreshing
Description copied from interface:DynamicNode
Is the node updating?- Specified by:
isRefreshing
in interfaceDynamicNode
- Returns:
- true if the node is updating; false otherwise.
-
getRowSet
TrackingRowSet getRowSet()- Returns:
- The
TrackingRowSet
that exposes the row keys present in this Table
-
sizeForInstrumentation
long sizeForInstrumentation() -
isEmpty
boolean isEmpty()Returnstrue
if this table has no rows (i.e.size() == 0
).- Returns:
true
if this table has no rows
-
isFlat
Return true if this table is guaranteed to be flat. The RowSet of a flat table will be from 0...numRows-1. -
setAttribute
Set the value of an attribute.- Parameters:
key
- The name of the attribute; must not benull
object
- The value to be assigned; must not benull
-
getAttribute
Get the value of the specified attribute.- Parameters:
key
- the name of the attribute- Returns:
- the value, or null if there was none.
-
getAttributeNames
Get a set of all the attributes that have values for this table.- Returns:
- a set of names
-
hasAttribute
Check if the specified attribute exists in this table.- Parameters:
name
- the name of the attribute- Returns:
- true if the attribute exists
-
getAttributes
Get all attributes from this Table.- Returns:
- An unmodifiable map containing all attributes from this Table
-
getAttributes
Get all attributes from this Table except the items that appear inexcluded
.- Parameters:
excluded
- A set of attributes to exclude from the result- Returns:
- An unmodifiable map containing Table's attributes, except the ones present in
excluded
-
getColumnSource
Retrieves aColumnSource
. It is conveniently cast to @{code ColumnSource} using the type that caller expects. This differs from getColumnSource(String, Class)
which uses the providedClass
object to verify that the data type is a subclass of the expected class.- Type Parameters:
T
- The target type, as a type parameter. Inferred from context.- Parameters:
sourceName
- The name of the column- Returns:
- The column source for
sourceName
, parameterized byT
-
getColumnSource
- 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
-
getColumnSourceMap
Map<String,? extends ColumnSource<?>> getColumnSourceMap() -
getColumnSources
Collection<? extends ColumnSource<?>> getColumnSources() -
getColumns
DataColumn[] getColumns() -
getColumn
-
getColumn
-
columnIterator
-
characterColumnIterator
-
byteColumnIterator
-
shortColumnIterator
-
integerColumnIterator
-
longColumnIterator
-
floatColumnIterator
-
doubleColumnIterator
-
objectColumnIterator
-
getRecord
-
where
- Specified by:
where
in interfaceTableOperations<Table,Table>
-
where
-
where
- Specified by:
where
in interfaceTableOperations<Table,Table>
-
wouldMatch
A table operation that applies the supplied predicate to each row in the table and produces columns containing the pass/fail result of the predicate application. This is similar towhere(String...)
except that instead of selecting only rows that meet the criteria, new columns are added with the result of the comparison.- Returns:
- a table with new columns containing the filter result for each row.
-
wouldMatch
-
whereIn
Description copied from interface:TableOperations
Filtersthis
table based on the set of values in therightTable
.Note that when the
rightTable
ticks, all of the rows inthis
table are going to be re-evaluated, thus the intention is that therightTable
is fairly slow moving compared withthis
table.- Specified by:
whereIn
in interfaceTableOperations<Table,Table>
- Parameters:
rightTable
- the filtering table.columnsToMatch
- the columns to match between the two tables- Returns:
- a new table filtered on right table
-
whereIn
Description copied from interface:TableOperations
Filtersthis
table based on the set of values in therightTable
.Delegates to
TableOperations.whereIn(Object, Collection)
.- Specified by:
whereIn
in interfaceTableOperations<Table,Table>
- Parameters:
rightTable
- the filtering table.columnsToMatch
- the columns to match between the two tables- Returns:
- a new table filtered on right table
-
whereNotIn
Description copied from interface:TableOperations
Filtersthis
table based on the set of values not in therightTable
.Note that when the
rightTable
ticks, all of the rows inthis
table are going to be re-evaluated, thus the intention is that therightTable
is fairly slow moving compared withthis
table.- Specified by:
whereNotIn
in interfaceTableOperations<Table,Table>
- Parameters:
rightTable
- the filtering table.columnsToMatch
- the columns to match between the two tables- Returns:
- a new table filtered on right table
-
whereNotIn
Description copied from interface:TableOperations
Filtersthis
table based on the set of values not in therightTable
.Delegates to
TableOperations.whereNotIn(Object, Collection)
.- Specified by:
whereNotIn
in interfaceTableOperations<Table,Table>
- Parameters:
rightTable
- the filtering table.columnsToMatch
- the columns to match between the two tables- Returns:
- a new table filtered on right table
-
select
- Specified by:
select
in interfaceTableOperations<Table,Table>
-
select
-
select
- Specified by:
select
in interfaceTableOperations<Table,Table>
-
select
Table select() -
selectDistinct
- Specified by:
selectDistinct
in interfaceTableOperations<Table,Table>
-
selectDistinct
- Specified by:
selectDistinct
in interfaceTableOperations<Table,Table>
-
selectDistinct
- Specified by:
selectDistinct
in interfaceTableOperations<Table,Table>
-
selectDistinct
- Specified by:
selectDistinct
in interfaceTableOperations<Table,Table>
-
update
- Specified by:
update
in interfaceTableOperations<Table,Table>
-
update
-
update
- Specified by:
update
in interfaceTableOperations<Table,Table>
-
lazyUpdate
Compute column formulas on demand.Lazy update defers computation until required for a set of values, and caches the results for a set of input values. This uses less RAM than an update statement when you have a smaller set of unique values. Less computation than an updateView is needed, because the results are saved in a cache.
If you have many unique values, you should instead use an update statement, which will have more memory efficient structures. Values are never removed from the lazyUpdate cache, so it should be used judiciously on a ticking table.
- Parameters:
newColumns
- the columns to add- Returns:
- a new Table with the columns added; to be computed on demand
-
lazyUpdate
-
lazyUpdate
-
view
- Specified by:
view
in interfaceTableOperations<Table,Table>
-
view
-
view
- Specified by:
view
in interfaceTableOperations<Table,Table>
-
updateView
- Specified by:
updateView
in interfaceTableOperations<Table,Table>
-
updateView
-
updateView
- Specified by:
updateView
in interfaceTableOperations<Table,Table>
-
dropColumns
-
dropColumns
-
dropColumnFormats
-
renameColumns
-
renameColumns
-
renameColumns
-
renameAllColumns
-
formatColumns
-
formatRowWhere
-
formatColumnWhere
-
moveColumnsUp
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")
.- Parameters:
columnsToMove
- The columns to move to the left (and, optionally, to rename)- Returns:
- The new table, with the columns rearranged as explained above
moveColumns(int, String...)
-
moveColumnsDown
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")
.- Parameters:
columnsToMove
- The columns to move to the right (and, optionally, to rename)- Returns:
- The new table, with the columns rearranged as explained above
moveColumns(int, String...)
-
moveColumns
Produce a new table with the specified columns moved to the specifiedindex
. Column indices begin at 0. Columns can be renamed with the usual syntax, i.e."NewColumnName=OldColumnName")
.- Parameters:
index
- The index to which the specified columns should be movedcolumnsToMove
- The columns to move to the specified index (and, optionally, to rename)- Returns:
- The new table, with the columns rearranged as explained above
-
moveColumns
-
dateTimeColumnAsNanos
Produce a new table with the same columns as this table, but with a new column presenting the specified DateTime column as a Long column (with each DateTime represented instead as the corresponding number of nanos since the epoch).NOTE: This is a really just an updateView(), and behaves accordingly for column ordering and (re)placement. This doesn't work on data that has been brought fully into memory (e.g. via select()). Use a view instead.
- Parameters:
dateTimeColumnName
- Name of date time columnnanosColumnName
- Name of nanos column- Returns:
- The new table, constructed as explained above.
-
dateTimeColumnAsNanos
- Parameters:
columnName
- name of column to convert from DateTime to nanos- Returns:
- The result of dateTimeColumnAsNanos(columnName, columnName).
-
head
- Specified by:
head
in interfaceTableOperations<Table,Table>
-
tail
- Specified by:
tail
in interfaceTableOperations<Table,Table>
-
slice
Extracts a subset of a table by row position.If both firstPosition and lastPosition are positive, then the rows are counted from the beginning of the table. The firstPosition is inclusive, and the lastPosition is exclusive. The
head(long)
(N) call is equivalent to slice(0, N). The firstPosition must be less than or equal to the lastPosition.If firstPosition is positive and lastPosition is negative, then the firstRow is counted from the beginning of the table, inclusively. The lastPosition is counted from the end of the table. For example, slice(1, -1) includes all rows but the first and last. If the lastPosition would be before the firstRow, the result is an emptyTable.
If firstPosition is negative, and lastPosition is zero, then the firstRow is counted from the end of the table, and the end of the slice is the size of the table. slice(-N, 0) is equivalent to
tail(long)
(N).If the firstPosition is negative and the lastPosition is negative, they are both counted from the end of the table. For example, slice(-2, -1) returns the second to last row of the table.
- Parameters:
firstPositionInclusive
- the first position to include in the resultlastPositionExclusive
- the last position to include in the result- Returns:
- a new Table, which is the request subset of rows from the original table
-
headPct
Provides a head that selects a dynamic number of rows based on a percent.- Parameters:
percent
- the fraction of the table to return (0..1), the number of rows will be rounded up. For example if there are 3 rows, headPct(50) returns the first two rows.
-
tailPct
-
exactJoin
-
exactJoin
Table exactJoin(Table rightTable, Collection<? extends JoinMatch> columnsToMatch, Collection<? extends JoinAddition> columnsToAdd)Description copied from interface:TableOperations
Perform an exact-join with therightTable
.Similar to
TableOperations.naturalJoin(Object, Collection, Collection)
, but requires that exactly one match from therightTable
.- Specified by:
exactJoin
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:
- the exact-joined table
-
exactJoin
Description copied from interface:TableOperations
Perform an exact-join with therightTable
.Delegates to
TableOperations.exactJoin(Object, Collection, Collection)
.- Specified by:
exactJoin
in interfaceTableOperations<Table,Table>
- Parameters:
rightTable
- The right side table on the join.columnsToMatch
- A comma separated list of match conditions ("leftColumn=rightColumn" or "columnFoundInBoth")columnsToAdd
- A comma separated list with the columns from the right side that need to be added to the left side as a result of the match.- Returns:
- the exact-joined table
-
exactJoin
Description copied from interface:TableOperations
Perform an exact-join with therightTable
.Delegates to
TableOperations.exactJoin(Object, Collection, Collection)
.- Specified by:
exactJoin
in interfaceTableOperations<Table,Table>
- Parameters:
rightTable
- The right side table on the join.columnsToMatch
- A comma separated list of match conditions ("leftColumn=rightColumn" or "columnFoundInBoth")- Returns:
- the exact-joined table
-
aj
Table aj(Table rightTable, MatchPair[] columnsToMatch, MatchPair[] columnsToAdd, Table.AsOfMatchRule asOfMatchRule)Looks up the columns in the rightTable that meet the match conditions in the columnsToMatch list. Matching is done exactly for the first n-1 columns and via a binary search for the last match pair. The columns of the original table are returned intact, together with the columns from rightTable defined in a comma separated list "columnsToAdd"- Parameters:
rightTable
- The right side table on the join.columnsToMatch
- A comma separated list of match conditions ("leftColumn=rightColumn" or "columnFoundInBoth")columnsToAdd
- A comma separated list with the columns from the left side that need to be added to the right side as a result of the match.- Returns:
- a new table joined according to the specification in columnsToMatch and columnsToAdd
-
aj
Looks up the columns in the rightTable that meet the match conditions in the columnsToMatch list. Matching is done exactly for the first n-1 columns and via a binary search for the last match pair. The columns of the original table are returned intact, together with the columns from rightTable defined in a comma separated list "columnsToAdd"- Parameters:
rightTable
- The right side table on the join.columnsToMatch
- A comma separated list of match conditions ("leftColumn=rightColumn" or "columnFoundInBoth")columnsToAdd
- A comma separated list with the columns from the left side that need to be added to the right side as a result of the match.- Returns:
- a new table joined according to the specification in columnsToMatch and columnsToAdd
-
aj
Table aj(Table rightTable, Collection<? extends JoinMatch> columnsToMatch, Collection<? extends JoinAddition> columnsToAdd)Description copied from interface:TableOperations
Perform an as-of join with therightTable
.Delegates to
TableOperations.aj(Object, Collection, Collection, AsOfJoinRule)
.- Specified by:
aj
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
-
aj
Table aj(Table rightTable, Collection<? extends JoinMatch> columnsToMatch, Collection<? extends JoinAddition> columnsToAdd, AsOfJoinRule asOfJoinRule)Description copied from interface:TableOperations
Perform an as-of join with therightTable
.Looks up the columns in the
rightTable
that meet the match conditions incolumnsToMatch
. Matching is done exactly for the first n-1 columns and via a binary search for the last match pair. The columns of thethis
table are returned intact, together with the columns fromrightTable
defined in thecolumnsToAdd
.- Specified by:
aj
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.asOfJoinRule
- The binary search operator for the last match pair.- Returns:
- a new table joined according to the specification in columnsToMatch and columnsToAdd
-
aj
Looks up the columns in the rightTable that meet the match conditions in the columnsToMatch list. Matching is done exactly for the first n-1 columns and via a binary search for the last match pair. The columns of the original table are returned intact, together with all the columns from rightTable.- Parameters:
rightTable
- The right side table on the join.columnsToMatch
- A comma separated list of match conditions ("leftColumn=rightColumn" or "columnFoundInBoth")- Returns:
- a new table joined according to the specification in columnsToMatch and columnsToAdd
-
aj
Description copied from interface:TableOperations
Perform an as-of join with therightTable
.Delegates to
TableOperations.aj(Object, Collection, Collection, AsOfJoinRule)
.- Specified by:
aj
in interfaceTableOperations<Table,Table>
- Parameters:
rightTable
- The right side table on the join.columnsToMatch
- A comma separated list of match conditions ("leftColumn=rightColumn" or "columnFoundInBoth").columnsToAdd
- A comma separated list with the columns from the left side that need to be added to the right side as a result of the match.- Returns:
- a new table joined according to the specification in columnsToMatch and columnsToAdd
-
aj
Description copied from interface:TableOperations
Perform an as-of join with therightTable
.Delegates to
TableOperations.aj(Object, Collection, Collection, AsOfJoinRule)
.- Specified by:
aj
in interfaceTableOperations<Table,Table>
- Parameters:
rightTable
- The right side table on the join.columnsToMatch
- A comma separated list of match conditions ("leftColumn=rightColumn" or "columnFoundInBoth").- Returns:
- a new table joined according to the specification in columnsToMatch
-
raj
Table raj(Table rightTable, MatchPair[] columnsToMatch, MatchPair[] columnsToAdd, Table.AsOfMatchRule asOfMatchRule)Just like .aj(), but the matching on the last column is in reverse order, so that you find the row after the given timestamp instead of the row before.Looks up the columns in the rightTable that meet the match conditions in the columnsToMatch list. Matching is done exactly for the first n-1 columns and via a binary search for the last match pair. The columns of the original table are returned intact, together with the columns from rightTable defined in a comma separated list "columnsToAdd"
- Parameters:
rightTable
- The right side table on the join.columnsToMatch
- A comma separated list of match conditions ("leftColumn=rightColumn" or "columnFoundInBoth")columnsToAdd
- A comma separated list with the columns from the left side that need to be added to the right side as a result of the match.- Returns:
- a new table joined according to the specification in columnsToMatch and columnsToAdd
-
raj
Just like .aj(), but the matching on the last column is in reverse order, so that you find the row after the given timestamp instead of the row before.Looks up the columns in the rightTable that meet the match conditions in the columnsToMatch list. Matching is done exactly for the first n-1 columns and via a binary search for the last match pair. The columns of the original table are returned intact, together with the columns from rightTable defined in a comma separated list "columnsToAdd"
- Parameters:
rightTable
- The right side table on the join.columnsToMatch
- A comma separated list of match conditions ("leftColumn=rightColumn" or "columnFoundInBoth")columnsToAdd
- A comma separated list with the columns from the left side that need to be added to the right side as a result of the match.- Returns:
- a new table joined according to the specification in columnsToMatch and columnsToAdd
-
raj
Table raj(Table rightTable, Collection<? extends JoinMatch> columnsToMatch, Collection<? extends JoinAddition> columnsToAdd)Description copied from interface:TableOperations
Perform a reverse-as-of join with therightTable
.Delegates to
TableOperations.raj(Object, Collection, Collection, ReverseAsOfJoinRule)
.- Specified by:
raj
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
-
raj
Table raj(Table rightTable, Collection<? extends JoinMatch> columnsToMatch, Collection<? extends JoinAddition> columnsToAdd, ReverseAsOfJoinRule reverseAsOfJoinRule)Description copied from interface:TableOperations
Perform a reverse-as-of join with therightTable
.Just like
TableOperations.aj(Object, Collection, Collection, AsOfJoinRule)
, but the matching on the last column is in reverse order, so that you find the row after the given timestamp instead of the row before.Looks up the columns in the
rightTable
that meet the match conditions incolumnsToMatch
. Matching is done exactly for the first n-1 columns and via a binary search for the last match pair. The columns ofthis
table are returned intact, together with the columns fromrightTable
defined incolumnsToAdd
.- Specified by:
raj
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.reverseAsOfJoinRule
- The binary search operator for the last match pair.- Returns:
- a new table joined according to the specification in columnsToMatch and columnsToAdd
-
raj
Just like .aj(), but the matching on the last column is in reverse order, so that you find the row after the given timestamp instead of the row before.Looks up the columns in the rightTable that meet the match conditions in the columnsToMatch list. Matching is done exactly for the first n-1 columns and via a binary search for the last match pair. The columns of the original table are returned intact, together with the all columns from rightTable.
- Parameters:
rightTable
- The right side table on the join.columnsToMatch
- A comma separated list of match conditions ("leftColumn=rightColumn" or "columnFoundInBoth")- Returns:
- a new table joined according to the specification in columnsToMatch and columnsToAdd
-
raj
Just like .aj(), but the matching on the last column is in reverse order, so that you find the row after the given timestamp instead of the row before.Looks up the columns in the rightTable that meet the match conditions in the columnsToMatch list. Matching is done exactly for the first n-1 columns and via a binary search for the last match pair. The columns of the original table are returned intact, together with the columns from rightTable defined in a comma separated list "columnsToAdd"
- Specified by:
raj
in interfaceTableOperations<Table,Table>
- Parameters:
rightTable
- The right side table on the join.columnsToMatch
- A comma separated list of match conditions ("leftColumn=rightColumn" or "columnFoundInBoth")columnsToAdd
- A comma separated list with the columns from the left side that need to be added to the right side as a result of the match.- Returns:
- a new table joined according to the specification in columnsToMatch and columnsToAdd
-
raj
Description copied from interface:TableOperations
Perform an reverse-as-of join with therightTable
.Delegates to
TableOperations.raj(Object, Collection, Collection, ReverseAsOfJoinRule)
.- Specified by:
raj
in interfaceTableOperations<Table,Table>
- Parameters:
rightTable
- The right side table on the join.columnsToMatch
- A comma separated list of match conditions ("leftColumn=rightColumn" or "columnFoundInBoth").- Returns:
- a new table joined according to the specification in columnsToMatch
-
naturalJoin
-
naturalJoin
Table naturalJoin(Table rightTable, Collection<? extends JoinMatch> columnsToMatch, Collection<? extends JoinAddition> columnsToAdd)Description copied from interface:TableOperations
Perform an exact-join with therightTable
.Requires zero or one match from the
rightTable
.- Specified by:
naturalJoin
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:
- the natural-joined table
-
naturalJoin
Description copied from interface:TableOperations
Perform a natural-join with therightTable
.Delegates to
TableOperations.naturalJoin(Object, Collection, Collection)
.- Specified by:
naturalJoin
in interfaceTableOperations<Table,Table>
- Parameters:
rightTable
- The right side table on the join.columnsToMatch
- A comma separated list of match conditions ("leftColumn=rightColumn" or "columnFoundInBoth")columnsToAdd
- A comma separated list with the columns from the right side that need to be added to the left side as a result of the match.- Returns:
- the natural-joined table
-
naturalJoin
Description copied from interface:TableOperations
Perform an natural-join with therightTable
.Delegates to
TableOperations.naturalJoin(Object, Collection, Collection)
.- Specified by:
naturalJoin
in interfaceTableOperations<Table,Table>
- Parameters:
rightTable
- The right side table on the join.columnsToMatch
- A comma separated list of match conditions ("leftColumn=rightColumn" or "columnFoundInBoth")- Returns:
- the natural-joined table
-
join
Perform a cross join with the right table.Returns a table that is the cartesian product of left rows X right rows, with one column for each of the left table's columns, and one column corresponding to each of the right table's columns. The rows are ordered first by the left table then by the right table.
To efficiently produce updates, the bits that represent a key for a given row are split into two. Unless specified, join reserves 16 bits to represent a right row. When there are too few bits to represent all of the right rows for a given aggregation group the table will shift a bit from the left side to the right side. The default of 16 bits was carefully chosen because it results in an efficient implementation to process live updates.
An
OutOfKeySpaceException
is thrown when the total number of bits needed to express the result table exceeds that needed to represent Long.MAX_VALUE. There are a few work arounds: - If the left table is sparse, consider flattening the left table. - If there are no key-columns and the right table is sparse, consider flattening the right table. - If the maximum size of a right table's group is small, you can reserve fewer bits by setting numRightBitsToReserve on initialization.Note: If you can prove that a given group has at most one right-row then you should prefer using
naturalJoin(io.deephaven.engine.table.Table, io.deephaven.engine.table.MatchPair[], io.deephaven.engine.table.MatchPair[])
.- Parameters:
rightTable
- The right side table on the join.- Returns:
- a new table joined according to the specification with zero key-columns and includes all right columns
-
join
Perform a cross join with the right table.Returns a table that is the cartesian product of left rows X right rows, with one column for each of the left table's columns, and one column corresponding to each of the right table's columns. The rows are ordered first by the left table then by the right table.
To efficiently produce updates, the bits that represent a key for a given row are split into two. Unless specified, join reserves 16 bits to represent a right row. When there are too few bits to represent all of the right rows for a given aggregation group the table will shift a bit from the left side to the right side. The default of 16 bits was carefully chosen because it results in an efficient implementation to process live updates.
An
OutOfKeySpaceException
is thrown when the total number of bits needed to express the result table exceeds that needed to represent Long.MAX_VALUE. There are a few work arounds: - If the left table is sparse, consider flattening the left table. - If there are no key-columns and the right table is sparse, consider flattening the right table. - If the maximum size of a right table's group is small, you can reserve fewer bits by setting numRightBitsToReserve on initialization.Note: If you can prove that a given group has at most one right-row then you should prefer using
naturalJoin(io.deephaven.engine.table.Table, io.deephaven.engine.table.MatchPair[], io.deephaven.engine.table.MatchPair[])
.- Parameters:
rightTable
- The right side table on the join.numRightBitsToReserve
- The number of bits to reserve for rightTable groups.- Returns:
- a new table joined according to the specification with zero key-columns and includes all right columns
-
join
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
- A comma separated list of match conditions ("leftColumn=rightColumn" or "columnFoundInBoth")- Returns:
- a new table joined according to the specification in columnsToMatch and includes all non-key-columns from the right table
- See Also:
TableOperations.join(Object, Collection, Collection, int)
-
join
Perform a cross join with the right table.Returns a table that is the cartesian product of left rows X right rows, with one column for each of the left table's columns, and one column corresponding to each of the right table's columns that are not key-columns. The rows are ordered first by the left table then by the right table. If columnsToMatch is non-empty then the product is filtered by the supplied match conditions.
To efficiently produce updates, the bits that represent a key for a given row are split into two. Unless specified, join reserves 16 bits to represent a right row. When there are too few bits to represent all of the right rows for a given aggregation group the table will shift a bit from the left side to the right side. The default of 16 bits was carefully chosen because it results in an efficient implementation to process live updates.
An
OutOfKeySpaceException
is thrown when the total number of bits needed to express the result table exceeds that needed to represent Long.MAX_VALUE. There are a few work arounds: - If the left table is sparse, consider flattening the left table. - If there are no key-columns and the right table is sparse, consider flattening the right table. - If the maximum size of a right table's group is small, you can reserve fewer bits by setting numRightBitsToReserve on initialization.Note: If you can prove that a given group has at most one right-row then you should prefer using
naturalJoin(io.deephaven.engine.table.Table, io.deephaven.engine.table.MatchPair[], io.deephaven.engine.table.MatchPair[])
.- Parameters:
rightTable
- The right side table on the join.columnsToMatch
- A comma separated list of match conditions ("leftColumn=rightColumn" or "columnFoundInBoth")numRightBitsToReserve
- The number of bits to reserve for rightTable groups.- Returns:
- a new table joined according to the specification in columnsToMatch and includes all non-key-columns from the right table
-
join
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
- A comma separated list of match conditions ("leftColumn=rightColumn" or "columnFoundInBoth")columnsToAdd
- A comma separated list with 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
- See Also:
TableOperations.join(Object, Collection, Collection, int)
-
join
Table join(Table rightTable, String columnsToMatch, String columnsToAdd, int numRightBitsToReserve)Perform a cross join with the right table.Returns a table that is the cartesian product of left rows X right rows, with one column for each of the left table's columns, and one column corresponding to each of the right table's columns that are included in the columnsToAdd argument. The rows are ordered first by the left table then by the right table. If columnsToMatch is non-empty then the product is filtered by the supplied match conditions.
To efficiently produce updates, the bits that represent a key for a given row are split into two. Unless specified, join reserves 16 bits to represent a right row. When there are too few bits to represent all of the right rows for a given aggregation group the table will shift a bit from the left side to the right side. The default of 16 bits was carefully chosen because it results in an efficient implementation to process live updates.
An
OutOfKeySpaceException
is thrown when the total number of bits needed to express the result table exceeds that needed to represent Long.MAX_VALUE. There are a few work arounds: - If the left table is sparse, consider flattening the left table. - If there are no key-columns and the right table is sparse, consider flattening the right table. - If the maximum size of a right table's group is small, you can reserve fewer bits by setting numRightBitsToReserve on initialization.Note: If you can prove that a given group has at most one right-row then you should prefer using
naturalJoin(io.deephaven.engine.table.Table, io.deephaven.engine.table.MatchPair[], io.deephaven.engine.table.MatchPair[])
.- Parameters:
rightTable
- The right side table on the join.columnsToMatch
- A comma separated list of match conditions ("leftColumn=rightColumn" or "columnFoundInBoth")columnsToAdd
- A comma separated list with the columns from the right side that need to be added to the left side as a result of the match.numRightBitsToReserve
- The number of bits to reserve for rightTable groups.- Returns:
- a new table joined according to the specification in columnsToMatch and columnsToAdd
-
join
Perform a cross join with the right table.Returns a table that is the cartesian product of left rows X right rows, with one column for each of the left table's columns, and one column corresponding to each of the right table's columns that are included in the columnsToAdd argument. The rows are ordered first by the left table then by the right table. If columnsToMatch is non-empty then the product is filtered by the supplied match conditions.
To efficiently produce updates, the bits that represent a key for a given row are split into two. Unless specified, join reserves 16 bits to represent a right row. When there are too few bits to represent all of the right rows for a given aggregation group the table will shift a bit from the left side to the right side. The default of 16 bits was carefully chosen because it results in an efficient implementation to process live updates.
An
OutOfKeySpaceException
is thrown when the total number of bits needed to express the result table exceeds that needed to represent Long.MAX_VALUE. There are a few work arounds: - If the left table is sparse, consider flattening the left table. - If there are no key-columns and the right table is sparse, consider flattening the right table. - If the maximum size of a right table's group is small, you can reserve fewer bits by setting numRightBitsToReserve on initialization.Note: If you can prove that a given group has at most one right-row then you should prefer using
naturalJoin(io.deephaven.engine.table.Table, io.deephaven.engine.table.MatchPair[], io.deephaven.engine.table.MatchPair[])
.- Parameters:
rightTable
- The right side table on the join.columnsToMatch
- An array of match pair conditions ("leftColumn=rightColumn" or "columnFoundInBoth")columnsToAdd
- An array of 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
-
join
Table join(Table rightTable, MatchPair[] columnsToMatch, MatchPair[] columnsToAdd, int numRightBitsToReserve)Perform a cross join with the right table.Returns a table that is the cartesian product of left rows X right rows, with one column for each of the left table's columns, and one column corresponding to each of the right table's columns that are included in the columnsToAdd argument. The rows are ordered first by the left table then by the right table. If columnsToMatch is non-empty then the product is filtered by the supplied match conditions.
To efficiently produce updates, the bits that represent a key for a given row are split into two. Unless specified, join reserves 16 bits to represent a right row. When there are too few bits to represent all of the right rows for a given aggregation group the table will shift a bit from the left side to the right side. The default of 16 bits was carefully chosen because it results in an efficient implementation to process live updates.
An
OutOfKeySpaceException
is thrown when the total number of bits needed to express the result table exceeds that needed to represent Long.MAX_VALUE. There are a few work arounds: - If the left table is sparse, consider flattening the left table. - If there are no key-columns and the right table is sparse, consider flattening the right table. - If the maximum size of a right table's group is small, you can reserve fewer bits by setting numRightBitsToReserve on initialization.Note: If you can prove that a given group has at most one right-row then you should prefer using
naturalJoin(io.deephaven.engine.table.Table, io.deephaven.engine.table.MatchPair[], io.deephaven.engine.table.MatchPair[])
.- Parameters:
rightTable
- The right side table on the join.columnsToMatch
- An array of match pair conditions ("leftColumn=rightColumn" or "columnFoundInBoth")columnsToAdd
- An array of the columns from the right side that need to be added to the left side as a result of the match.numRightBitsToReserve
- The number of bits to reserve for rightTable groups.- Returns:
- a new table joined according to the specification in columnsToMatch and columnsToAdd
-
join
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
-
join
Table join(Table rightTable, Collection<? extends JoinMatch> columnsToMatch, Collection<? extends JoinAddition> columnsToAdd, int numRightBitsToReserve)Description copied from interface:TableOperations
Perform a cross join with therightTable
.Returns a table that is the cartesian product of left rows X right rows, with one column for each of
this
table's columns, and one column corresponding to each of therightTable
's columns that are included in thecolumnsToAdd
argument. The rows are ordered first by thethis
table then by therightTable
. IfcolumnsToMatch
is non-empty then the product is filtered by the supplied match conditions.To efficiently produce updates, the bits that represent a key for a given row are split into two. Unless specified, join reserves 16 bits to represent a right row. When there are too few bits to represent all of the right rows for a given aggregation group the table will shift a bit from the left side to the right side. The default of 16 bits was carefully chosen because it results in an efficient implementation to process live updates.
An io.deephaven.engine.table.impl.util.OutOfKeySpaceException is thrown when the total number of bits needed to express the result table exceeds that needed to represent Long.MAX_VALUE. There are a few work arounds:
- If the left table is sparse, consider flattening the left table.
- If there are no key-columns and the right table is sparse, consider flattening the right table.
- If the maximum size of a right table's group is small, you can reserve fewer bits by setting
reserveBits
on initialization.Note: If you know that a given group has at most one right-row then you should prefer using
TableOperations.naturalJoin(Object, Collection, Collection)
.- 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.numRightBitsToReserve
- The number of bits to reserve for rightTable groups.- Returns:
- a new table joined according to the specification in columnsToMatch and columnsToAdd
-
groupBy
- Specified by:
groupBy
in interfaceTableOperations<Table,Table>
-
groupBy
- Specified by:
groupBy
in interfaceTableOperations<Table,Table>
-
groupBy
- Specified by:
groupBy
in interfaceTableOperations<Table,Table>
-
aggAllBy
- Specified by:
aggAllBy
in interfaceTableOperations<Table,Table>
-
aggAllBy
- Specified by:
aggAllBy
in interfaceTableOperations<Table,Table>
-
aggAllBy
- Specified by:
aggAllBy
in interfaceTableOperations<Table,Table>
-
aggAllBy
- Specified by:
aggAllBy
in interfaceTableOperations<Table,Table>
-
aggBy
- Specified by:
aggBy
in interfaceTableOperations<Table,Table>
-
aggBy
- Specified by:
aggBy
in interfaceTableOperations<Table,Table>
-
aggBy
@ConcurrentMethod Table aggBy(Aggregation aggregation, Collection<? extends Selectable> groupByColumns)- Specified by:
aggBy
in interfaceTableOperations<Table,Table>
-
aggBy
@ConcurrentMethod Table aggBy(Collection<? extends Aggregation> aggregations, Collection<? extends Selectable> groupByColumns)- Specified by:
aggBy
in interfaceTableOperations<Table,Table>
-
aggBy
@ConcurrentMethod Table aggBy(Collection<? extends Aggregation> aggregations, String... groupByColumns)- Specified by:
aggBy
in interfaceTableOperations<Table,Table>
-
aggBy
- Specified by:
aggBy
in interfaceTableOperations<Table,Table>
-
headBy
-
headBy
-
tailBy
-
tailBy
-
applyToAllBy
@ConcurrentMethod Table applyToAllBy(String formulaColumn, String columnParamName, Collection<? extends Selectable> groupByColumns)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
.- Parameters:
formulaColumn
- Formula applied to each columncolumnParamName
- The parameter name used as a placeholder for each columngroupByColumns
- The grouping columns as ingroupBy(Collection)
-
applyToAllBy
@ConcurrentMethod Table applyToAllBy(String formulaColumn, Collection<? extends Selectable> groupByColumns)Groups data according to groupByColumns and applies formulaColumn to each of columns not altered by the grouping operation.- Parameters:
formulaColumn
- Formula applied to each column, uses parameter each to refer to each colum it being applied togroupByColumns
- The grouping columns as ingroupBy(Collection)
-
applyToAllBy
Groups data according to groupByColumns and applies formulaColumn to each of columns not altered by the grouping operation.- Parameters:
formulaColumn
- Formula applied to each column, uses parameter each to refer to each colum it being applied togroupByColumns
- The grouping columns as ingroupBy(java.util.Collection<? extends io.deephaven.api.Selectable>)
-
sumBy
Groups the data column according togroupByColumns
and computes the sum for the rest of the fields- Specified by:
sumBy
in interfaceTableOperations<Table,Table>
- Parameters:
groupByColumns
- The grouping columns as ingroupBy(java.util.Collection<? extends io.deephaven.api.Selectable>)
-
sumBy
Groups the data column according togroupByColumns
and computes the sum for the rest of the fields- Specified by:
sumBy
in interfaceTableOperations<Table,Table>
- Parameters:
groupByColumns
- The grouping columns as ingroupBy(java.util.Collection<? extends io.deephaven.api.Selectable>)
-
sumBy
Groups the data column according togroupByColumns
and computes the sum for the rest of the fields- Specified by:
sumBy
in interfaceTableOperations<Table,Table>
- Parameters:
groupByColumns
- The grouping columns as ingroupBy(java.util.Collection<? extends io.deephaven.api.Selectable>)
-
sumBy
Produces a single row table with the sum of each column.When the input table is empty, zero output rows are produced.
- Specified by:
sumBy
in interfaceTableOperations<Table,Table>
-
absSumBy
Groups the data column according togroupByColumns
and computes the sum of the absolute values for the rest of the fields- Specified by:
absSumBy
in interfaceTableOperations<Table,Table>
- Parameters:
groupByColumns
- The grouping columns as ingroupBy(java.util.Collection<? extends io.deephaven.api.Selectable>)
-
absSumBy
Groups the data column according togroupByColumns
and computes the sum of the absolute values for the rest of the fields- Specified by:
absSumBy
in interfaceTableOperations<Table,Table>
- Parameters:
groupByColumns
- The grouping columns as ingroupBy(java.util.Collection<? extends io.deephaven.api.Selectable>)
-
absSumBy
Groups the data column according togroupByColumns
and computes the sum of the absolute values for the rest of the fields- Specified by:
absSumBy
in interfaceTableOperations<Table,Table>
- Parameters:
groupByColumns
- The grouping columns as ingroupBy(java.util.Collection<? extends io.deephaven.api.Selectable>)
-
absSumBy
Produces a single row table with the absolute sum of each column.When the input table is empty, zero output rows are produced.
- Specified by:
absSumBy
in interfaceTableOperations<Table,Table>
-
avgBy
Groups the data column according togroupByColumns
and computes the average for the rest of the fields- Specified by:
avgBy
in interfaceTableOperations<Table,Table>
- Parameters:
groupByColumns
- The grouping columns as ingroupBy(java.util.Collection<? extends io.deephaven.api.Selectable>)
-
avgBy
Groups the data column according togroupByColumns
and computes the average for the rest of the fields- Specified by:
avgBy
in interfaceTableOperations<Table,Table>
- Parameters:
groupByColumns
- The grouping columns as ingroupBy(java.util.Collection<? extends io.deephaven.api.Selectable>)
-
avgBy
Groups the data column according togroupByColumns
and computes the average for the rest of the fields- Specified by:
avgBy
in interfaceTableOperations<Table,Table>
- Parameters:
groupByColumns
- The grouping columns as ingroupBy(java.util.Collection<? extends io.deephaven.api.Selectable>)
-
avgBy
Produces a single row table with the average of each column.When the input table is empty, zero output rows are produced.
- Specified by:
avgBy
in interfaceTableOperations<Table,Table>
-
wavgBy
Groups the data column according togroupByColumns
and computes the weighted average using weightColumn for the rest of the fields- Specified by:
wavgBy
in interfaceTableOperations<Table,Table>
- Parameters:
weightColumn
- the column to use for the weightgroupByColumns
- The grouping columns as ingroupBy(java.util.Collection<? extends io.deephaven.api.Selectable>)
-
wavgBy
Groups the data column according togroupByColumns
and computes the weighted average using weightColumn for the rest of the fields- Specified by:
wavgBy
in interfaceTableOperations<Table,Table>
- Parameters:
weightColumn
- the column to use for the weightgroupByColumns
- The grouping columns as ingroupBy(java.util.Collection<? extends io.deephaven.api.Selectable>)
-
wavgBy
Groups the data column according togroupByColumns
and computes the weighted average using weightColumn for the rest of the fields- Specified by:
wavgBy
in interfaceTableOperations<Table,Table>
- Parameters:
weightColumn
- the column to use for the weightgroupByColumns
- The grouping columns as ingroupBy(java.util.Collection<? extends io.deephaven.api.Selectable>)
-
wavgBy
Produces a single row table with the weighted average using weightColumn for the rest of the fieldsWhen the input table is empty, zero output rows are produced.
- Specified by:
wavgBy
in interfaceTableOperations<Table,Table>
- Parameters:
weightColumn
- the column to use for the weight
-
wsumBy
Groups the data column according togroupByColumns
and computes the weighted sum using weightColumn for the rest of the fieldsIf the weight column is a floating point type, all result columns will be doubles. If the weight column is an integral type, all integral input columns will have long results and all floating point input columns will have double results.
- Specified by:
wsumBy
in interfaceTableOperations<Table,Table>
- Parameters:
weightColumn
- the column to use for the weightgroupByColumns
- The grouping columns as ingroupBy(java.util.Collection<? extends io.deephaven.api.Selectable>)
-
wsumBy
Computes the weighted sum for all rows in the table using weightColumn for the rest of the fieldsIf the weight column is a floating point type, all result columns will be doubles. If the weight column is an integral type, all integral input columns will have long results and all floating point input columns will have double results.
- Specified by:
wsumBy
in interfaceTableOperations<Table,Table>
- Parameters:
weightColumn
- the column to use for the weight
-
wsumBy
Groups the data column according togroupByColumns
and computes the weighted sum using weightColumn for the rest of the fieldsIf the weight column is a floating point type, all result columns will be doubles. If the weight column is an integral type, all integral input columns will have long results and all floating point input columns will have double results.
- Specified by:
wsumBy
in interfaceTableOperations<Table,Table>
- Parameters:
weightColumn
- the column to use for the weightgroupByColumns
- The grouping columns as ingroupBy(java.util.Collection<? extends io.deephaven.api.Selectable>)
-
wsumBy
Groups the data column according togroupByColumns
and computes the weighted sum using weightColumn for the rest of the fieldsIf the weight column is a floating point type, all result columns will be doubles. If the weight column is an integral type, all integral input columns will have long results and all floating point input columns will have double results.
- Specified by:
wsumBy
in interfaceTableOperations<Table,Table>
- Parameters:
weightColumn
- the column to use for the weightgroupByColumns
- The grouping columns as ingroupBy(java.util.Collection<? extends io.deephaven.api.Selectable>)
-
stdBy
- Specified by:
stdBy
in interfaceTableOperations<Table,Table>
-
stdBy
Groups the data column according togroupByColumns
and computes the standard deviation for the rest of the fields- Specified by:
stdBy
in interfaceTableOperations<Table,Table>
- Parameters:
groupByColumns
- The grouping columns as ingroupBy(java.util.Collection<? extends io.deephaven.api.Selectable>)
-
stdBy
Groups the data column according togroupByColumns
and computes the standard deviation for the rest of the fields- Specified by:
stdBy
in interfaceTableOperations<Table,Table>
- Parameters:
groupByColumns
- The grouping columns as ingroupBy(java.util.Collection<? extends io.deephaven.api.Selectable>)
-
stdBy
Produces a single row table with the standard deviation of each column.When the input table is empty, zero output rows are produced.
- Specified by:
stdBy
in interfaceTableOperations<Table,Table>
-
varBy
Groups the data column according togroupByColumns
and computes the variance for the rest of the fields- Specified by:
varBy
in interfaceTableOperations<Table,Table>
- Parameters:
groupByColumns
- The grouping columns as ingroupBy(java.util.Collection<? extends io.deephaven.api.Selectable>)
-
varBy
Groups the data column according togroupByColumns
and computes the variance for the rest of the fields- Specified by:
varBy
in interfaceTableOperations<Table,Table>
- Parameters:
groupByColumns
- The grouping columns as ingroupBy(java.util.Collection<? extends io.deephaven.api.Selectable>)
-
varBy
Groups the data column according togroupByColumns
and computes the variance for the rest of the fields- Specified by:
varBy
in interfaceTableOperations<Table,Table>
- Parameters:
groupByColumns
- The grouping columns as ingroupBy(java.util.Collection<? extends io.deephaven.api.Selectable>)
-
varBy
Produces a single row table with the variance of each column.When the input table is empty, zero output rows are produced.
- Specified by:
varBy
in interfaceTableOperations<Table,Table>
-
lastBy
Groups the data column according togroupByColumns
and retrieves the last for the rest of the fields- Specified by:
lastBy
in interfaceTableOperations<Table,Table>
- Parameters:
groupByColumns
- The grouping columns as ingroupBy(java.util.Collection<? extends io.deephaven.api.Selectable>)
-
lastBy
Groups the data column according togroupByColumns
and retrieves the last for the rest of the fields- Specified by:
lastBy
in interfaceTableOperations<Table,Table>
- Parameters:
groupByColumns
- The grouping columns as ingroupBy(java.util.Collection<? extends io.deephaven.api.Selectable>)
-
lastBy
Groups the data column according togroupByColumns
and retrieves the last for the rest of the fields- Specified by:
lastBy
in interfaceTableOperations<Table,Table>
- Parameters:
groupByColumns
- The grouping columns as ingroupBy(java.util.Collection<? extends io.deephaven.api.Selectable>)
-
lastBy
Returns the last row of the given table.- Specified by:
lastBy
in interfaceTableOperations<Table,Table>
-
firstBy
Groups the data column according togroupByColumns
and retrieves the first for the rest of the fields- Specified by:
firstBy
in interfaceTableOperations<Table,Table>
- Parameters:
groupByColumns
- The grouping columns as ingroupBy(java.util.Collection<? extends io.deephaven.api.Selectable>)
-
firstBy
Groups the data column according togroupByColumns
and retrieves the first for the rest of the fields- Specified by:
firstBy
in interfaceTableOperations<Table,Table>
- Parameters:
groupByColumns
- The grouping columns as ingroupBy(java.util.Collection<? extends io.deephaven.api.Selectable>)
-
firstBy
Groups the data column according togroupByColumns
and retrieves the first for the rest of the fields- Specified by:
firstBy
in interfaceTableOperations<Table,Table>
- Parameters:
groupByColumns
- The grouping columns as ingroupBy(java.util.Collection<? extends io.deephaven.api.Selectable>)
-
firstBy
Returns the first row of the given table.- Specified by:
firstBy
in interfaceTableOperations<Table,Table>
-
minBy
Groups the data column according togroupByColumns
and computes the min for the rest of the fields- Specified by:
minBy
in interfaceTableOperations<Table,Table>
- Parameters:
groupByColumns
- The grouping columns as ingroupBy(java.util.Collection<? extends io.deephaven.api.Selectable>)
-
minBy
Groups the data column according togroupByColumns
and computes the min for the rest of the fields- Specified by:
minBy
in interfaceTableOperations<Table,Table>
- Parameters:
groupByColumns
- The grouping columns as ingroupBy(java.util.Collection<? extends io.deephaven.api.Selectable>)
-
minBy
Groups the data column according togroupByColumns
and computes the min for the rest of the fields- Specified by:
minBy
in interfaceTableOperations<Table,Table>
- Parameters:
groupByColumns
- The grouping columns as ingroupBy(java.util.Collection<? extends io.deephaven.api.Selectable>)
-
minBy
Produces a single row table with the minimum of each column.When the input table is empty, zero output rows are produced.
- Specified by:
minBy
in interfaceTableOperations<Table,Table>
-
maxBy
Groups the data column according togroupByColumns
and computes the max for the rest of the fields- Specified by:
maxBy
in interfaceTableOperations<Table,Table>
- Parameters:
groupByColumns
- The grouping columns as ingroupBy(java.util.Collection<? extends io.deephaven.api.Selectable>)
}
-
maxBy
Groups the data column according togroupByColumns
and computes the max for the rest of the fields- Specified by:
maxBy
in interfaceTableOperations<Table,Table>
- Parameters:
groupByColumns
- The grouping columns as ingroupBy(java.util.Collection<? extends io.deephaven.api.Selectable>)
}
-
maxBy
Groups the data column according togroupByColumns
and computes the max for the rest of the fields- Specified by:
maxBy
in interfaceTableOperations<Table,Table>
- Parameters:
groupByColumns
- The grouping columns as ingroupBy(java.util.Collection<? extends io.deephaven.api.Selectable>)
}
-
maxBy
Produces a single row table with the maximum of each column.When the input table is empty, zero output rows are produced.
- Specified by:
maxBy
in interfaceTableOperations<Table,Table>
-
medianBy
Groups the data column according togroupByColumns
and computes the median for the rest of the fields- Specified by:
medianBy
in interfaceTableOperations<Table,Table>
- Parameters:
groupByColumns
- The grouping columns as ingroupBy(java.util.Collection<? extends io.deephaven.api.Selectable>)
}
-
medianBy
Groups the data column according togroupByColumns
and computes the median for the rest of the fields- Specified by:
medianBy
in interfaceTableOperations<Table,Table>
- Parameters:
groupByColumns
- The grouping columns as ingroupBy(java.util.Collection<? extends io.deephaven.api.Selectable>)
}
-
medianBy
Groups the data column according togroupByColumns
and computes the median for the rest of the fields- Specified by:
medianBy
in interfaceTableOperations<Table,Table>
- Parameters:
groupByColumns
- The grouping columns as ingroupBy(java.util.Collection<? extends io.deephaven.api.Selectable>)
}
-
medianBy
Produces a single row table with the median of each column.When the input table is empty, zero output rows are produced.
- Specified by:
medianBy
in interfaceTableOperations<Table,Table>
-
countBy
- Specified by:
countBy
in interfaceTableOperations<Table,Table>
-
countBy
- Specified by:
countBy
in interfaceTableOperations<Table,Table>
-
countBy
- Specified by:
countBy
in interfaceTableOperations<Table,Table>
-
countBy
- Specified by:
countBy
in interfaceTableOperations<Table,Table>
-
dropStream
If this table is a stream table, i.e. it hasSTREAM_TABLE_ATTRIBUTE
set totrue
, return a child without the attribute, restoring standard semantics for aggregation operations.- Returns:
- A non-stream child table, or this table if it is not a stream table
-
ungroup
Ungroups a table by converting arrays into columns.- Parameters:
nullFill
- indicates if the ungrouped table should allow disparate sized arrays filling shorter columns with null values. If set to false, then all arrays should be the same length.columnsToUngroup
- the columns to ungroup- Returns:
- the ungrouped table
-
ungroup
-
ungroupAllBut
-
ungroup
Table ungroup() -
ungroup
-
partitionBy
Create aPartitionedTable
from this table, partitioned according to the specified key columns.The underlying partitioned table backing the result contains each row in
this
table in exactly one of the result's constituent tables.- Parameters:
dropKeys
- Whether to drop key columns in the output constituent tableskeyColumnNames
- The name of the key columns to partition by- Returns:
- A
PartitionedTable
keyed bykeyColumnNames
-
partitionBy
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.- Parameters:
keyColumnNames
- The name of the key columns to partition by- Returns:
- A
PartitionedTable
keyed bykeyColumnNames
-
rollup
@ConcurrentMethod Table rollup(Collection<? extends Aggregation> aggregations, Collection<String> columns)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.
- Parameters:
aggregations
- The aggregations to performcolumns
- the columns to group by- Returns:
- a hierarchical table with the rollup applied
-
rollup
@ConcurrentMethod Table rollup(Collection<? extends Aggregation> aggregations, boolean includeConstituents, Collection<String> columns)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.
- Parameters:
aggregations
- The aggregations to performincludeConstituents
- set to true to include the constituent rows at the leaf levelcolumns
- the columns to group by- Returns:
- a hierarchical table with the rollup applied
-
rollup
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.
- Parameters:
aggregations
- The aggregations to performcolumns
- the columns to group by- Returns:
- a hierarchical table with the rollup applied
-
rollup
@ConcurrentMethod Table rollup(Collection<? extends Aggregation> aggregations, boolean includeConstituents, String... columns)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.
- Parameters:
aggregations
- The aggregations to performcolumns
- the columns to group byincludeConstituents
- set to true to include the constituent rows at the leaf level- Returns:
- a hierarchical table with the rollup applied
-
rollup
@ConcurrentMethod Table rollup(Collection<? extends Aggregation> aggregations, Selectable... columns)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.
- Parameters:
aggregations
- The aggregations to performcolumns
- the columns to group by- Returns:
- a hierarchical table with the rollup applied
-
rollup
Create a rollup table.A rollup table aggregates all rows of the table.
- Parameters:
aggregations
- The aggregations to perform- Returns:
- a hierarchical table with the rollup applied
-
rollup
@ConcurrentMethod Table rollup(Collection<? extends Aggregation> aggregations, boolean includeConstituents)Create a rollup table.A rollup table aggregates all rows of the table.
- Parameters:
aggregations
- The aggregations to performincludeConstituents
- set to true to include the constituent rows at the leaf level- Returns:
- a hierarchical table with the rollup applied
-
rollup
@ConcurrentMethod Table rollup(Collection<? extends Aggregation> aggregations, boolean includeConstituents, Selectable... columns) -
treeTable
Create a hierarchical tree table.The structure of the table is encoded by an "id" and a "parent" column. The id column should represent a unique identifier for a given row, and the parent column indicates which row is the parent for a given row. Rows that have a null parent, are shown in the main table. It is possible for rows to be "orphaned", if their parent reference is non-null and does not exist in the table.
- Parameters:
idColumn
- the name of a column containing a unique identifier for a particular row in the tableparentColumn
- the name of a column containing the parent's identifier, null for elements that are part of the root table- Returns:
- a hierarchical table grouped according to the parentColumn
-
updateBy
Create a table with the samerowSet
as its parent that will perform the specified set of row based operation to it.- Specified by:
updateBy
in interfaceTableOperations<Table,Table>
- Parameters:
operation
- the operation to apply to the table.- Returns:
- a table with the same index, with the specified operations applied to the entire table
-
updateBy
Create a table with the samerowSet
as its parent that will perform the specified set of row based operations to it. As opposed toupdate(String...)
these operations are more restricted but are capable of processing state between rows.- Specified by:
updateBy
in interfaceTableOperations<Table,Table>
- Parameters:
operations
- the operations to apply to the table.- Returns:
- a table with the same index, with the specified operations applied to the entire table.
-
updateBy
@ConcurrentMethod Table updateBy(@NotNull UpdateByControl control, @NotNull Collection<? extends UpdateByClause> operations)Create a table with the samerowSet
as its parent that will perform the specified set of row based operations to it. As opposed toupdate(String...)
these operations are more restricted but are capable of processing state between rows. This operation will group the table by the specified set of keys if provided before applying the operation.- Specified by:
updateBy
in interfaceTableOperations<Table,Table>
- Parameters:
control
- thecontrol
to use when updating the table.operations
- the operations to apply to the table.- Returns:
- a table with the same index, with the specified operations applied to each group defined by the
byColumns
-
updateBy
Create a table with the samerowSet
as its parent that will perform the specified row based operation to it. This operation will group the table by the specified set of keys if provided before applying the operation.- Specified by:
updateBy
in interfaceTableOperations<Table,Table>
- Parameters:
operation
- the operation to apply to the table.byColumns
- the columns to group by before applying.- Returns:
- a table with the same index, with the specified operations applied to each group defined by the
byColumns
-
updateBy
@ConcurrentMethod Table updateBy(@NotNull Collection<? extends UpdateByClause> operations, String... byColumns)Create a table with the samerowSet
as its parent that will perform the specified set of row based operations to it. As opposed toupdate(String...)
these operations are more restricted but are capable of processing state between rows. This operation will group the table by the specified set of keys if provided before applying the operation.- Specified by:
updateBy
in interfaceTableOperations<Table,Table>
- Parameters:
operations
- the operations to apply to the table.byColumns
- the columns to group by before applying.- Returns:
- a table with the same index, with the specified operations applied to each group defined by the
byColumns
-
updateBy
@ConcurrentMethod Table updateBy(@NotNull Collection<? extends UpdateByClause> operations, @NotNull Collection<? extends Selectable> byColumns)Create a table with the samerowSet
as its parent that will perform the specified set of row based operations to it. As opposed toupdate(String...)
these operations are more restricted but are capable of processing state between rows. This operation will group the table by the specified set of keys if provided before applying the operation.- Specified by:
updateBy
in interfaceTableOperations<Table,Table>
- Parameters:
operations
- the operations to apply to the table.byColumns
- the columns to group by before applying.- Returns:
- a table with the same index, with the specified operations applied to each group defined by the
byColumns
-
updateBy
@ConcurrentMethod Table updateBy(@NotNull UpdateByControl control, @NotNull Collection<? extends UpdateByClause> operations, @NotNull Collection<? extends Selectable> byColumns)Create a table with the samerowSet
as its parent that will perform the specified set of row based operations to it. As opposed toupdate(String...)
these operations are more restricted but are capable of processing state between rows. This operation will group the table by the specified set of keys if provided before applying the operation.- Specified by:
updateBy
in interfaceTableOperations<Table,Table>
- Parameters:
control
- thecontrol
to use when updating the table.operations
- the operations to apply to the table.byColumns
- the columns to group by before applying.- Returns:
- a table with the same index, with the specified operations applied to each group defined by the
byColumns
-
sort
- Specified by:
sort
in interfaceTableOperations<Table,Table>
-
sortDescending
- Specified by:
sortDescending
in interfaceTableOperations<Table,Table>
-
sort
- Specified by:
sort
in interfaceTableOperations<Table,Table>
-
reverse
- Specified by:
reverse
in interfaceTableOperations<Table,Table>
-
restrictSortTo
Disallow sorting on all but the specified columns.
- Parameters:
allowedSortingColumns
- The columns on which sorting is allowed.- Returns:
- The same table this was invoked on.
-
clearSortingRestrictions
Clear all sorting restrictions that was applied to the current table.
Note that this table operates on the table it was invoked on and does not create a new table. So in the following code
T1 = baseTable.where(...) T2 = T1.restrictSortTo("C1") T3 = T2.clearSortingRestrictions()
T1 == T2 == T3 and the result has no restrictions on sorting.
- Returns:
- The same table this was invoked on.
-
snapshot
Description copied from interface:TableOperations
SnapshotbaseTable
, triggered bythis
table, and return a new table as a result.Delegates to
TableOperations.snapshot(Object, boolean, Collection)
.- Specified by:
snapshot
in interfaceTableOperations<Table,Table>
- Parameters:
baseTable
- The table to be snapshotteddoInitialSnapshot
- Take the first snapshot now (otherwise wait for a change event)stampColumns
- The columns forming the "snapshot key", i.e. some subset of this Table's columns to be included in the result at snapshot time. As a special case, an empty stampColumns is taken to mean "include all columns".- Returns:
- The result table
-
snapshot
Description copied from interface:TableOperations
SnapshotbaseTable
, triggered bythis
table, and return a new table as a result. The returned table will include an initial snapshot.Delegates to
TableOperations.snapshot(Object, boolean, Collection)
.- Specified by:
snapshot
in interfaceTableOperations<Table,Table>
- Parameters:
baseTable
- The table to be snapshottedstampColumns
- The columns forming the "snapshot key", i.e. some subset of this Table's columns to be included in the result at snapshot time. As a special case, an empty stampColumns is taken to mean "include all columns".- Returns:
- The result table
-
snapshotIncremental
-
snapshotIncremental
-
snapshotHistory
-
snapshot
Description copied from interface:TableOperations
SnapshotbaseTable
, triggered bythis
table, and return a new table as a result.this
table is the triggering table, i.e. the table whose change events cause a new snapshot to be taken. The result table includes a "snapshot key" which is a subset (possibly all) ofthis
table's columns. The remaining columns in the result table come frombaseTable
, the table being snapshotted.- Specified by:
snapshot
in interfaceTableOperations<Table,Table>
- Parameters:
baseTable
- The table to be snapshotteddoInitialSnapshot
- Take the first snapshot now (otherwise wait for a change event)stampColumns
- The columns forming the "snapshot key", i.e. some subset of this Table's columns to be included in the result at snapshot time. As a special case, an empty stampColumns is taken to mean "include all columns".- Returns:
- The result table
-
mergeBefore
Merge this Table withothers
. All rows in this Table will appear before all rows inothers
. If Tables inothers
are the result of a prior merge operation, they may be expanded in an attempt to avoid deeply nested structures.- Parameters:
others
- The Tables to merge with- Returns:
- The merged Table
- ApiNote:
- It's best to avoid many chained calls to
mergeBefore(Table...)
andmergeAfter(Table...)
, as this may result in deeply-nested data structures, See TableTools.merge(Table...)
-
mergeAfter
Merge this Table withothers
. All rows in this Table will appear after all rows inothers
. If Tables inothers
are the result of a prior merge operation, they may be expanded in an attempt to avoid deeply nested structures.- Parameters:
others
- The Tables to merge with- Returns:
- The merged Table
- ApiNote:
- It's best to avoid many chained calls to
mergeBefore(Table...)
andmergeAfter(Table...)
, as this may result in deeply-nested data structures, See TableTools.merge(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.- Returns:
- This table, or a fully-coalesced child
-
getSubTable
Get aTable
that contains a sub-set of the rows fromthis
. The result will share the samecolumn sources
anddefinition
as this table. The result will not update on its own. The caller must also establish an appropriate listener to updaterowSet
and propagateupdates
.- Parameters:
rowSet
- Therow set
for the result- Returns:
- A new sub-table
-
apply
Applies a function to this table.This is useful if you have a reference to a table or a proxy and want to run a series of operations against the table without each individual operation resulting in an RMI.
- Type Parameters:
R
- the return type of function- Parameters:
function
- the function to run, its single argument will be this table- Returns:
- the return value of function
- ImplNote:
- If the UGP is not required the
Function.apply(Object)
method should be annotated withConcurrentMethod
.
-
flatten
Creates a version of this table with a flat RowSet. -
withKeys
Set the table's key columns.- Returns:
- The same table this method was invoked on, with the keyColumns attribute set
-
withUniqueKeys
Set the table's key columns and indicate that each key set will be unique.- Returns:
- The same table this method was invoked on, with the keyColumns and unique attributes set
-
withTableDescription
-
withColumnDescription
Add a description for a specific column. You may usewithColumnDescription(Map)
to set several descriptions at once.- Parameters:
column
- the name of the columndescription
- the column description- Returns:
- a copy of the source table with the description applied
-
withColumnDescription
Add a set of column descriptions to the table.- Parameters:
descriptions
- a map of Column name to Column description.- Returns:
- a copy of the table with the descriptions applied.
-
setLayoutHints
Set layout hints.- Parameters:
hints
- A packed string of layout hints- Returns:
- A copy of this Table with the
layout hints attribute
set
-
setTotalsTable
Set a totals table for this Table.- Parameters:
directive
- A packed string of totals table instructions- Returns:
- A copy of this Table with the
totals table attribute
set
-
setColumnRenderers
Set renderers for columns.- Parameters:
directive
- A packed string of column rendering instructions- Returns:
- A copy of this Table with the
column renderers attribute
set
-
close
void close()Release resources held by this table, possibly destructively. This may render the table unsuitable or unsafe for further use.- ApiNote:
- In practice, implementations usually just invoke
releaseCachedResources()
.
-
releaseCachedResources
void releaseCachedResources()Attempt to release cached resources held by this table. Unlikeclose()
, this must not render the table unusable for subsequent read operations. Implementations should be sure to callsuper.releaseCachedResources()
. -
awaitUpdate
Wait for updates to this Table.
In some implementations, this call may also terminate in case of interrupt or spurious wakeup (see java.util.concurrent.locks.Condition#await()).
- Throws:
InterruptedException
- In the event this thread is interrupted
-
awaitUpdate
Wait for updates to this Table.
In some implementations, this call may also terminate in case of interrupt or spurious wakeup (see java.util.concurrent.locks.Condition#await()).
- Parameters:
timeout
- The maximum time to wait in milliseconds.- Returns:
- false if the timeout elapses without notification, true otherwise.
- Throws:
InterruptedException
- In the event this thread is interrupted
-
listenForUpdates
Subscribe for updates to this table.listener
will be invoked via theNotificationQueue
associated with this Table.- Parameters:
listener
- listener for updates
-
listenForUpdates
Subscribe for updates to this table. After the optional initial image,listener
will be invoked via theNotificationQueue
associated with this Table.- Parameters:
listener
- listener for updatesreplayInitialImage
- true to process updates for all initial rows in the table plus all changes; false to only process changes
-
listenForUpdates
Subscribe for updates to this table.listener
will be invoked via theNotificationQueue
associated with this Table.- Parameters:
listener
- listener for updates
-
removeUpdateListener
Unsubscribe the supplied listener.- Parameters:
listener
- listener for updates
-
removeUpdateListener
Unsubscribe the supplied listener.- Parameters:
listener
- listener for updates
-
isFailed
boolean isFailed()- Returns:
- true if this table is in a failure state.
-