Interface Table
- All Superinterfaces:
Deflatable<Table>
,LivenessManager
,LivenessNode
,LivenessReferent
,LongSizedDataStructure
- All Known Subinterfaces:
DynamicTable
,LazySnapshotTable
,RemoteTableHandle.TableProxy
,TableMapProxyHandler.TableMapProxy
- All Known Implementing Classes:
AppendOnlyArrayBackedMutableTable
,BaseTable
,ConnectionAwareRemoteTable
,DeferredViewTable
,HierarchicalTable
,InitialSnapshotTable
,InMemoryTable
,KeyedArrayBackedMutableTable
,LiveQueryTable
,NestedPartitionedDiskBackedTable
,PartitionAwareSourceTable
,PreemptiveUpdatesTable
,QueryReplayGroupedTable
,QueryTable
,QueryTable.FilteredTable
,RedefinableTable
,ReplayGroupedFullTable
,ReplayLastByGroupedTable
,ReplayTable
,ReplicatedTable
,SimpleSourceTable
,SourceTable
,SplayedDiskBackedTable
,SubscriptionSnapshotTable
,TimeTable
,UncoalescedTable
,UpdatableTable
,WrappedDelegatingTable
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enum
static enum
GroupStrategy is used for joins and other operations that can choose one of several ways to make use of grouping information.static interface
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final String
static final String
This attribute is applied to source tables, and takes on Boolean values.static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
This attribute is used internally by TableTools.merge to detect successive merges.static final String
Set this attribute for tables that should not be displayed in the UI.static final String
Set this attribute to load a plugin for this table in the Web Clientstatic final String
static final String
static final String
static final String
This attribute stores a reference to a table that is the parent table for a Preview Table.static final String
static final String
static final String
static final String
static final String
The query engine may set or read this attribute to determine if a table is sorted by a particular column.static final String
static final String
static final String
static final String
static final String
static final String
Should a lastBy operation use untracked operations for this table?static final String
static final Table[]
-
Method Summary
Modifier and TypeMethodDescriptiondefault Table
absSumBy()
Produces a single row table with the absolute sum of each column.absSumBy
(SelectColumn... groupByColumns) Groups the data column according togroupByColumns
and computes the sum of the absolute values for the rest of the fieldsdefault Table
Groups the data column according togroupByColumns
and computes the sum of the absolute values for the rest of the fieldsdefault Table
absSumBy
(Collection<String> groupByColumns) Groups the data column according togroupByColumns
and computes the sum of the absolute values for the rest of the fieldsdefault Table
Looks up the columns in the rightTable that meet the match conditions in the columnsToMatch list.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.default Table
Looks up the columns in the rightTable that meet the match conditions in the columnsToMatch list.default Table
Looks up the columns in the rightTable that meet the match conditions in the columnsToMatch list.default Table
aj
(Table rightTable, Collection<String> columnsToMatch) Looks up the columns in the rightTable that meet the match conditions in the columnsToMatch list.default Table
aj
(Table rightTable, Collection<String> columnsToMatch, Collection<String> columnsToAdd) Looks up the columns in the rightTable that meet the match conditions in the columnsToMatch list.default <R> R
Applies a function to this table.default Table
applyToAllBy
(String formulaColumn, SelectColumn... groupByColumns) Groups data according to groupByColumns and applies formulaColumn to each of columns not altered by the grouping operation.default Table
applyToAllBy
(String formulaColumn, String groupByColumn) default Table
applyToAllBy
(String formulaColumn, String... groupByColumns) Groups data according to groupByColumns and applies formulaColumn to each of columns not altered by the grouping operation.applyToAllBy
(String formulaColumn, String columnParamName, SelectColumn... groupByColumns) Groups data according to groupByColumns and applies formulaColumn to each of columns not altered by the grouping operation.default Table
avgBy()
Produces a single row table with the average of each column.avgBy
(SelectColumn... groupByColumns) Groups the data column according togroupByColumns
and computes the average for the rest of the fieldsdefault Table
Groups the data column according togroupByColumns
and computes the average for the rest of the fieldsdefault Table
avgBy
(Collection<String> groupByColumns) Groups the data column according togroupByColumns
and computes the average for the rest of the fieldsdefault Table
by()
default Table
by
(AggregationStateFactory aggregationStateFactory) by
(AggregationStateFactory aggregationStateFactory, SelectColumn... groupByColumns) default Table
by
(AggregationStateFactory aggregationStateFactory, String... groupByColumns) default Table
by
(SelectColumn... groupByColumns) default Table
default Table
by
(Collection<String> groupByColumns) byExternal
(boolean dropKeys, String... keyColumnNames) Create aTableMap
from this table, keyed by the specified columns.default TableMap
byExternal
(String... keyColumnNames) Create aTableMap
from this table, keyed by the specified columns.default ByteColumnIterator
byteColumnIterator
(String columnName) default CharacterColumnIterator
characterColumnIterator
(String columnName) Clear all sorting restrictions that was applied to the current table.default void
close()
Release resources held by this table, possibly destructively.default Table
coalesce()
Explicitly ensure that any work needed to make a table indexable, iterable, or queryable has been done, and return the coalesced child table if appropriate.default <TYPE> Iterator<TYPE>
columnIterator
(String columnName) default Table
countBy
(String countColumnName, SelectColumn... groupByColumns) default Table
default Table
countBy
(String countColumnName, Collection<String> groupByColumns) default Table
dateTimeColumnAsNanos
(String columnName) default 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 DBDateTime column as a Long column (with each DBDateTime represented instead as the corresponding number of nanos since the epoch).default Inflatable<Table>
deflate
(ExportedObjectClient client) Convert this object into an Inflatable suitable for serialization.default Inflatable<Table>
deflate
(ExportedObjectClient client, boolean preSubscribed, boolean preSubscribedViewport) Deflate, but provide an extra boolean telling us whether we are presubscribing this preemptive table.default DoubleColumnIterator
doubleColumnIterator
(String columnName) default Table
dropColumns
(String... columnNames) default Table
dropColumns
(Collection<String> columnNames) Identical to naturalJoin, but fail if the right side does not produce a match.default Table
Identical to naturalJoin, but fail if the right side does not produce a match.default Table
Identical to naturalJoin, but fail if the right side does not produce a match.default Table
exactJoin
(Table rightTable, Collection<String> columnsToMatch) Identical to naturalJoin, but fail if the right side does not produce a match.default Table
exactJoin
(Table rightTable, Collection<String> columnsToMatch, Collection<String> columnsToAdd) Identical to naturalJoin, but fail if the right side does not produce a match.default Table
firstBy()
Returns the first row of the given table.firstBy
(SelectColumn... groupByColumns) Groups the data column according togroupByColumns
and retrieves the first for the rest of the fieldsdefault Table
Groups the data column according togroupByColumns
and retrieves the first for the rest of the fieldsdefault Table
firstBy
(Collection<String> groupByColumns) Groups the data column according togroupByColumns
and retrieves the first for the rest of the fieldsflatten()
Creates a version of this table with a flat index (V2 only).default FloatColumnIterator
floatColumnIterator
(String columnName) default Table
formatColumns
(String... columnFormats) default Table
formatColumnWhere
(String columnName, String condition, String formula) default Table
formatRowWhere
(String condition, String formula) getAttribute
(String key) Get the value of the specified attribute.Get a set of all the attributes that have values for this table.Get all of the attributes from the table.getAttributes
(Collection<String> excluded) Get all attributes from the desired table except the items that appear in excluded.default DataColumn
getColumn
(int columnIndex) default DataColumn[]
getColumnSource
(String sourceName) default <T> ColumnSource<T>
getColumnSource
(String sourceName, Class<? extends T> clazz) Map<String,
? extends ColumnSource> Collection<? extends ColumnSource>
getIndex()
default Table
getMeta()
Provides column metadata in Table form.Object[]
Returns an object array populated with the column values at the specified rowNo.getSubTable
(Index index) default Table
Called on client side of a preemptive table to create the replicated table which represents the server side preemptive table, but instead of looking at the whole table, we're just interested in the slice we can see on the screen.boolean
hasAttribute
(String name) Check if the specified attribute exists in this table.default boolean
hasColumns
(String... columnNames) Determines whether this Table contains a column for each string in the specified array ofcolumnNames
.default boolean
hasColumns
(Collection<String> columnNames) Determines whether this Table contains a column for each string in the specified collection ofcolumnNames
.head
(long size) default Table
headBy
(long nRows, SelectColumn... groupByColumns) default Table
headBy
(long nRows, Collection<String> groupByColumns) headPct
(double percent) Provides a head that selects a dynamic number of rows based on a percent.default IntegerColumnIterator
integerColumnIterator
(String columnName) default boolean
isEmpty()
Returnstrue
if this table has no rows (i.e.boolean
isFlat()
Return true if this table is guaranteed to be flat.default boolean
isLive()
default Table
Perform a cross join with the right table.default Table
Perform a cross join with the right table.default Table
Perform a cross join with the right table.join
(Table rightTable, MatchPair[] columnsToMatch, MatchPair[] columnsToAdd, int numRightBitsToReserve) Perform a cross join with the right table.default Table
Perform a cross join with the right table.default Table
Perform a cross join with the right table.default Table
Perform a cross join with the right table.default Table
Perform a cross join with the right table.default Table
join
(Table rightTable, Collection<String> columnsToMatch, Collection<String> columnsToAdd) Perform a cross join with the right table.default Table
join
(Table rightTable, Collection<String> columnsToMatch, Collection<String> columnsToAdd, int numRightBitsToReserve) Perform a cross join with the right table.default Table
lastBy()
Returns the last row of the given table.lastBy
(SelectColumn... groupByColumns) Groups the data column according togroupByColumns
and retrieves the last for the rest of the fieldsdefault Table
Groups the data column according togroupByColumns
and retrieves the last for the rest of the fieldsdefault Table
lastBy
(Collection<String> groupByColumns) Groups the data column according togroupByColumns
and retrieves the last for the rest of the fieldsdefault Table
layoutHints
(LayoutHintBuilder builder) layoutHints
(String hints) lazyUpdate
(SelectColumn... newColumns) Compute column formulas on demand.default Table
lazyUpdate
(String... newColumns) default Table
lazyUpdate
(Collection<String> newColumns) default Table
Augments this table with array columns of right-hand side matches.Augments this table with array columns of right-hand side matches.default Table
Augments this table with array columns of right-hand side matches.default Table
Augments this table with array columns of right-hand side matches.default Table
leftJoin
(Table rightTable, Collection<String> columnsToMatch) Augments this table with array columns of right-hand side matches.default Table
leftJoin
(Table rightTable, Collection<String> columnsToMatch, Collection<String> columnsToAdd) Augments this table with array columns of right-hand side matches.default LongColumnIterator
longColumnIterator
(String columnName) default Table
maxBy()
Produces a single row table with the maximum of each column.maxBy
(SelectColumn... groupByColumns) Groups the data column according togroupByColumns
and computes the max for the rest of the fieldsdefault Table
Groups the data column according togroupByColumns
and computes the max for the rest of the fieldsdefault Table
maxBy
(Collection<String> groupByColumns) Groups the data column according togroupByColumns
and computes the max for the rest of the fieldsdefault Table
medianBy()
Produces a single row table with the median of each column.medianBy
(SelectColumn... groupByColumns) Groups the data column according togroupByColumns
and computes the median for the rest of the fieldsdefault Table
Groups the data column according togroupByColumns
and computes the median for the rest of the fieldsdefault Table
medianBy
(Collection<String> groupByColumns) Groups the data column according togroupByColumns
and computes the median for the rest of the fieldsdefault Table
minBy()
Produces a single row table with the minimum of each column.minBy
(SelectColumn... groupByColumns) Groups the data column according togroupByColumns
and computes the min for the rest of the fieldsdefault Table
Groups the data column according togroupByColumns
and computes the min for the rest of the fieldsdefault Table
minBy
(Collection<String> groupByColumns) Groups the data column according togroupByColumns
and computes the min for the rest of the fieldsdefault Table
moveColumns
(int index, boolean moveToEnd, String... columnsToMove) default Table
moveColumns
(int index, String... columnsToMove) Produce a new table with the specified columns moved to the specifiedindex
.default Table
moveDownColumns
(String... columnsToMove) Produce a new table with the specified columns moved to the rightmost position.default Table
moveUpColumns
(String... columnsToMove) Produce a new table with the specified columns moved to the leftmost position.naturalJoin
(Table rightTable, MatchPair[] columnsToMatch, MatchPair[] columnsToAdd) Augment this table with zero or one row from the right table.default Table
naturalJoin
(Table rightTable, String columnsToMatch) Augment this table with zero or one row from the right table.default Table
naturalJoin
(Table rightTable, String columnsToMatch, String columnsToAdd) Augment this table with zero or one row from the right table.default Table
naturalJoin
(Table rightTable, Collection<String> columnsToMatch) Augment this table with zero or one row from the right table.default Table
naturalJoin
(Table rightTable, Collection<String> columnsToMatch, Collection<String> columnsToAdd) Augment this table with zero or one row from the right table.default Table
preemptiveSnapshotTable
(long updateInterval) preemptiveUpdatesTable
(long updateInterval) default Table
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.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.default Table
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.default Table
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.default 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.default Table
raj
(Table rightTable, Collection<String> columnsToMatch, Collection<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.default void
Attempt to release cached resources held by this table.default Table
renameAllColumns
(Table.RenameFunction renameFunction) renameColumns
(MatchPair... pairs) default Table
renameColumns
(String... columns) default Table
renameColumns
(Collection<String> columns) restrictSortTo
(String... allowedSortingColumns) Disallow sorting on all but the specified columns.reverse()
default HierarchicalTable
rollup
(ComboAggregateFactory comboAggregateFactory) Create a rollup table.default HierarchicalTable
rollup
(ComboAggregateFactory comboAggregateFactory, boolean includeConstituents) Create a rollup table.rollup
(ComboAggregateFactory comboAggregateFactory, boolean includeConstituents, SelectColumn... columns) default HierarchicalTable
rollup
(ComboAggregateFactory comboAggregateFactory, boolean includeConstituents, String... columns) Create a rollup table.default HierarchicalTable
rollup
(ComboAggregateFactory comboAggregateFactory, boolean includeConstituents, Collection<String> columns) Create a rollup table.default HierarchicalTable
rollup
(ComboAggregateFactory comboAggregateFactory, SelectColumn... columns) Create a rollup table.default HierarchicalTable
rollup
(ComboAggregateFactory comboAggregateFactory, String... columns) Create a rollup table.default HierarchicalTable
rollup
(ComboAggregateFactory comboAggregateFactory, Collection<String> columns) Create a rollup table.default Table
select()
select
(SelectColumn... columns) default Table
default Table
select
(Collection<String> columns) default Table
selectDistinct
(SelectColumn... columns) default Table
selectDistinct
(String... columns) default Table
selectDistinct
(Collection<String> columns) void
setAttribute
(String key, Object object) Set the value of an attribute.setColumnRenderers
(ColumnRenderersBuilder builder) Sets renderers for columns.setTotalsTable
(TotalsTableBuilder builder) Sets parameters for the default totals table display.default ShortColumnIterator
shortColumnIterator
(String columnName) default long
slice
(long firstPositionInclusive, long lastPositionExclusive) Extracts a subset of a table by row position.Snapshot "rightTable", triggered by "this" Table, and return a new Table as a result.default Table
snapshotHistory
(Table rightTable) snapshotIncremental
(Table rightTable, boolean doInitialSnapshot, String... stampColumns) default Table
snapshotIncremental
(Table rightTable, String... stampColumns) default Table
default Table
default Table
sortDescending
(String... columnsToSortBy) default Table
sortDescending
(List<String> columnsToSortBy) default Table
stdBy()
Produces a single row table with the standard deviation of each column.stdBy
(SelectColumn... groupByColumns) default Table
Groups the data column according togroupByColumns
and computes the standard deviation for the rest of the fieldsdefault Table
stdBy
(Collection<String> groupByColumns) Groups the data column according togroupByColumns
and computes the standard deviation for the rest of the fieldsdefault Table
Called on client side of a preemptive table to create the replicated table which represents the server side preemptive table.default Table
sumBy()
Produces a single row table with the sum of each column.sumBy
(SelectColumn... groupByColumns) Groups the data column according togroupByColumns
and computes the sum for the rest of the fieldsdefault Table
Groups the data column according togroupByColumns
and computes the sum for the rest of the fieldsdefault Table
sumBy
(Collection<String> groupByColumns) Groups the data column according togroupByColumns
and computes the sum for the rest of the fieldsdefault boolean
Returns true for client side tables where subscribeToPreemptiveUpdates should return a ReplicatedTable.tail
(long size) default Table
tailBy
(long nRows, SelectColumn... groupByColumns) default Table
tailBy
(long nRows, Collection<String> groupByColumns) tailPct
(double percent) Create a hierarchical tree table.default Table
ungroup()
default Table
ungroup
(boolean nullFill) Ungroups a table by converting arrays into columns.default Table
default Table
ungroupAllBut
(String... columnsNotToUngroup) update
(SelectColumn... newColumns) default Table
default Table
update
(Collection<String> newColumns) default Table
updateBy
(UpdateByClause operation) Create a table with the sameindex
as it's parent that will perform the specified set of row based operation to it.default Table
updateBy
(UpdateByClause operation, MatchPair... byColumns) Create a table with the sameindex
as it's parent that will perform the specified row based operation to it.default Table
updateBy
(UpdateByClause operation, String... byColumns) Create a table with the sameindex
as it's parent that will perform the specified row based operation to it.updateBy
(UpdateByControl control, Collection<UpdateByClause> operations, MatchPair... byColumns) Create a table with the sameindex
as it's parent that will perform the specified set of row based operations to it.default Table
updateBy
(Collection<UpdateByClause> operations) Create a table with the sameindex
as it's parent that will perform the specified set of row based operations to it.default Table
updateBy
(Collection<UpdateByClause> operations, String... byColumns) Create a table with the sameindex
as it's parent that will perform the specified set of row based operations to it.updateView
(SelectColumn... newColumns) default Table
updateView
(String... newColumns) default Table
updateView
(Collection<String> newColumns) validateSelect
(SelectColumn... columns) DO NOT USE -- this API is in flux and may change or disappear in the future.default SelectValidationResult
validateSelect
(String... columns) DO NOT USE -- this API is in flux and may change or disappear in the future.default Table
varBy()
Produces a single row table with the variance of each column.varBy
(SelectColumn... groupByColumns) Groups the data column according togroupByColumns
and computes the variance for the rest of the fieldsdefault Table
Groups the data column according togroupByColumns
and computes the variance for the rest of the fieldsdefault Table
varBy
(Collection<String> groupByColumns) Groups the data column according togroupByColumns
and computes the variance for the rest of the fieldsview
(SelectColumn... columns) default Table
default Table
view
(Collection<String> columns) default Table
Produces a single row table with the weighted average using weightColumn for the rest of the fields When the input table is empty, zero output rows are produced.wavgBy
(String weightColumn, SelectColumn... groupByColumns) Groups the data column according togroupByColumns
and computes the weighted average using weightColumn for the rest of the fieldsdefault Table
Groups the data column according togroupByColumns
and computes the weighted average using weightColumn for the rest of the fieldsdefault Table
wavgBy
(String weightColumn, Collection<String> groupByColumns) Groups the data column according togroupByColumns
and computes the weighted average using weightColumn for the rest of the fieldsdefault Table
where()
where
(SelectFilter... filters) default Table
default Table
where
(Collection<String> filters) Filters this table based on the set of values in the rightTable.default Table
default Table
default Table
default Table
whereNotIn
(Table rightTable, MatchPair... columnsToMatch) default Table
whereNotIn
(Table rightTable, String... columnsToMatch) default Table
default Table
whereOneOf
(String... filtersToApplyStrings) Applies the provided filters to the table disjunctively.default Table
whereOneOf
(Collection<SelectFilter>... filtersToApply) Filters according to an expression in disjunctive normal form.default Table
withColumnDescription
(String column, String description) Add a description for a specific column.withColumnDescription
(Map<String, String> descriptions) Add a set of column descriptions to the table.Set the table's key columns.withTableDescription
(String description) withUniqueKeys
(String... columns) Set the table's key columns and indicate that each key set will be unique.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.default Table
wouldMatch
(String... expressions) default Table
Computes the weighted sum for all rows in the table using weightColumn for the rest of the fields If the weight column is a floating point type, all result columns will be doubles.wsumBy
(String weightColumn, SelectColumn... groupByColumns) Groups the data column according togroupByColumns
and computes the weighted sum using weightColumn for the rest of the fields If the weight column is a floating point type, all result columns will be doubles.default Table
Groups the data column according togroupByColumns
and computes the weighted sum using weightColumn for the rest of the fields If the weight column is a floating point type, all result columns will be doubles.default Table
wsumBy
(String weightColumn, Collection<String> groupByColumns) Groups the data column according togroupByColumns
and computes the weighted sum using weightColumn for the rest of the fields If the weight column is a floating point type, all result columns will be doubles.Methods inherited from interface com.illumon.iris.db.util.liveness.LivenessManager
manage, tryManage
Methods inherited from interface com.illumon.iris.db.util.liveness.LivenessReferent
dropReference, getReferentDescription, getWeakReference, retainReference, tryRetainReference
Methods inherited from interface com.illumon.iris.db.util.LongSizedDataStructure
intSize, intSize, size
-
Field Details
-
ZERO_LENGTH_TABLE_ARRAY
-
ACL_ATTRIBUTE
- See Also:
-
DO_NOT_MAKE_REMOTE_ATTRIBUTE
- See Also:
-
CUSTOM_ACTIONS_ATTRIBUTE
- See Also:
-
INPUT_TABLE_ATTRIBUTE
- See Also:
-
KEY_COLUMNS_ATTRIBUTE
- See Also:
-
UNIQUE_KEYS_ATTRIBUTE
- See Also:
-
SORTABLE_COLUMNS_ATTRIBUTE
- See Also:
-
FILTERABLE_COLUMNS_ATTRIBUTE
- See Also:
-
LAYOUT_HINTS_ATTRIBUTE
- See Also:
-
TOTALS_TABLE_ATTRIBUTE
- See Also:
-
TABLE_DESCRIPTION_ATTRIBUTE
- See Also:
-
COLUMN_RENDERERS_ATTRIBUTE
- See Also:
-
COLUMN_DESCRIPTIONS_ATTRIBUTE
- See Also:
-
ADD_ONLY_TABLE_ATTRIBUTE
- See Also:
-
UNTRACKED_LASTBY_TABLE_ATTRIBUTE
Should a lastBy operation use untracked operations for this table?- See Also:
-
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:
-
SYSTEMIC_TABLE_ATTRIBUTE
- See Also:
-
ROLLUP_LEAF_ATTRIBUTE
- See Also:
-
HIERARCHICAL_CHILDREN_TABLE_MAP_ATTRIBUTE
- See Also:
-
HIERARCHICAL_SOURCE_TABLE_ATTRIBUTE
- See Also:
-
TREE_TABLE_FILTER_REVERSE_LOOKUP_ATTRIBUTE
- See Also:
-
HIERARCHICAL_SOURCE_INFO_ATTRIBUTE
- See Also:
-
REVERSE_LOOKUP_ATTRIBUTE
- See Also:
-
PREPARED_RLL_ATTRIBUTE
- See Also:
-
PREDEFINED_ROLLUP_ATTRIBUTE
- See Also:
-
SNAPSHOT_VIEWPORT_TYPE
- See Also:
-
PREEMPTIVE_VIEWPORT_TYPE
- See Also:
-
VIEWPORT_TYPE_ATTRIBUTE
- See Also:
-
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:
-
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:
- 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:
-
NON_DISPLAY_TABLE
Set this attribute for tables that should not be displayed in the UI.- See Also:
-
PLUGIN_NAME
Set this attribute to load a plugin for this table in the Web Client- See Also:
-
-
Method Details
-
getDefinition
TableDefinition 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
String getDescription() -
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
-
setAttribute
Set the value of an attribute.- Parameters:
key
- the name of the attributeobject
- the value
-
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 of the attributes from the table.- Returns:
- A map containing all of the attributes.
-
getAttributes
Get all attributes from the desired table except the items that appear in excluded.- Parameters:
excluded
- A set of attributes to exclude from the result- Returns:
- All of the table's attributes except the ones present in excluded
-
isLive
default boolean isLive() -
coalesce
Explicitly ensure that any work needed to make a table indexable, iterable, or queryable has been done, and return the coalesced child table if appropriate.- Returns:
- This table, or a fully-coalesced child
-
getIndex
Index getIndex() -
sizeForInstrumentation
default long sizeForInstrumentation() -
isEmpty
default boolean isEmpty()Returnstrue
if this table has no rows (i.e.size() == 0
).- Returns:
true
if this table has no rows
-
getColumnSource
-
getColumnSource
- Type Parameters:
T
- The target type, as a type parameter. Intended to be inferred fromclazz
.- Parameters:
sourceName
- The name of the column.clazz
- The target type.- Returns:
- The column source for
sourceName
, parameterized byT
.
-
getColumnSourceMap
Map<String,? extends ColumnSource> getColumnSourceMap() -
getColumnSources
Collection<? extends ColumnSource> getColumnSources() -
getColumns
-
getColumn
-
getColumn
-
columnIterator
-
byteColumnIterator
-
characterColumnIterator
-
doubleColumnIterator
-
floatColumnIterator
-
integerColumnIterator
-
longColumnIterator
-
shortColumnIterator
-
getRecord
Returns an object array populated with the column values at the specified rowNo. The ordering of columns in the object array is based on the columnNames array provided or by default the column ordering is based on TableDefinition.- Parameters:
rowNo
- The row whose values are needed. This should be a value between 0 and (table.size() - 1)columnNames
- Optional parameter of column names whose values are needed in the returned object array
-
where
-
where
-
where
-
where
-
wouldMatch
-
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.
-
whereIn
Filters this table based on the set of values in the rightTable. Note that when the right table ticks, all of the rows in the left table are going to be re-evaluated, thus the intention is that the right table is fairly slow moving compared with the left table.- Parameters:
rightTable
- the filtering table.inclusion
- whether things included in rightTable should be passed through (they are exluded if false)columnsToMatch
- the columns to match between the two tables- Returns:
- a new table filtered on right table
-
whereIn
-
whereIn
-
whereIn
-
whereNotIn
-
whereNotIn
-
whereOneOf
Filters according to an expression in disjunctive normal form.The input is an array of clauses, which in turn are a collection of filters.
- Parameters:
filtersToApply
- each inner collection is a set of filters, all of must which match for the clause to be true. If any one of the collections in the array evaluates to true, the row is part of the output table.- Returns:
- a new table, with the filters applied.
-
whereOneOf
Applies the provided filters to the table disjunctively.- Parameters:
filtersToApplyStrings
- an Array of filters to apply- Returns:
- a new table, with the filters applied
-
whereOneOf
-
getSubTable
-
select
-
select
-
select
-
select
-
selectDistinct
-
selectDistinct
-
selectDistinct
-
selectDistinct
-
update
-
update
-
update
-
validateSelect
DO NOT USE -- this API is in flux and may change or disappear in the future. -
validateSelect
DO NOT USE -- this API is in flux and may change or disappear in the future. -
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
-
view
-
view
-
updateView
-
updateView
-
updateView
-
dropColumns
-
dropColumnFormats
-
dropColumns
-
renameColumns
-
renameColumns
-
renameColumns
-
renameAllColumns
-
moveUpColumns
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...)
-
moveDownColumns
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
-
formatColumns
-
formatRowWhere
-
formatColumnWhere
-
dateTimeColumnAsNanos
Produce a new table with the same columns as this table, but with a new column presenting the specified DBDateTime column as a Long column (with each DBDateTime 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
-nanosColumnName
-- Returns:
- The new table, constructed as explained above.
-
dateTimeColumnAsNanos
- Parameters:
columnName
-- Returns:
- The result of dateTimeColumnAsNanos(columnName, columnName).
-
head
-
tail
-
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. Thehead(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 totail(long)
(N). If the firstPosition is nega tive 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
-
leftJoin
Augments this table with array columns of right-hand side matches.The leftJoin() method returns the exact rows of the leftTable. The data joined in from the rightTable are grouped into arrays of data. When no right-hand side data is found, the right hand columns are null.
- 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 be added to the left side as a result of the match. If empty, then all columns from the right table are added to the result.- Returns:
- a new table joined according to the specification in columnsToMatch and columnsToAdd
-
leftJoin
default Table leftJoin(Table rightTable, Collection<String> columnsToMatch, Collection<String> columnsToAdd) Augments this table with array columns of right-hand side matches.The leftJoin() method returns the exact rows of the leftTable. The data joined in from the rightTable are grouped into arrays of data. When no right-hand side data is found, the right hand columns are null.
When columnsToMatch is empty, then all rows of the right table are joined to all rows of the left table.
- Parameters:
rightTable
- The right side table on the join.columnsToMatch
- A collection of match conditions ("leftColumn=rightColumn" or "columnFoundInBoth")columnsToAdd
- A collections with the columns from the right side to be added to the left side as a result of the match. The column may be optionally renamed with "NewName=NameInRight". If empty, then all columns from the right table are added to the result.- Returns:
- a new table joined according to the specification in columnsToMatch and columnsToAdd
-
leftJoin
Augments this table with array columns of right-hand side matches.The leftJoin() method returns the exact rows of the leftTable. The data joined in from the rightTable are grouped into arrays of data. When no right-hand side data is found, the right hand columns are null.
When columnsToMatch is empty, then all rows of the right table are joined to all rows of the left table.
All columns from the right are added to the result without renames.
- Parameters:
rightTable
- The right side table on the join.columnsToMatch
- A collection of match conditions ("leftColumn=rightColumn" or "columnFoundInBoth")- Returns:
- a new table joined according to the specification in columnsToMatch and columnsToAdd
-
leftJoin
Augments this table with array columns of right-hand side matches.The leftJoin() method returns the exact rows of the leftTable. The data joined in from the rightTable are grouped into arrays of data. When no right-hand side data is found, the right hand columns are null.
When columnsToMatch is empty, then all rows of the right table are joined to all rows of the left 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. The column may be optionally renamed with "NewName=NameInRight". If empty, then all columns from the right table are added to the result.- Returns:
- a new table joined according to the specification in columnsToMatch and columnsToAdd
-
leftJoin
Augments this table with array columns of right-hand side matches.The leftJoin() method returns the exact rows of the leftTable. The data joined in from the rightTable are grouped into arrays of data. When no right-hand side data is found, the right hand columns are null.
When columnsToMatch is empty, then all rows of the right table are joined to all rows of the left table.
All columns from the right are added to the result without renames.
- 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
-
leftJoin
Augments this table with array columns of right-hand side matches.The leftJoin() method returns the exact rows of the leftTable. The data joined in from the rightTable are grouped into arrays of data. When no right-hand side data is found, the right hand columns are null.
All rows and columns of the right table are joined to all rows of the left table.
- Parameters:
rightTable
- The right side table on the join.- Returns:
- a new table joined according to the specification in columnsToMatch and columnsToAdd
-
exactJoin
Identical to naturalJoin, but fail if the right side does not produce a match. -
exactJoin
default Table exactJoin(Table rightTable, Collection<String> columnsToMatch, Collection<String> columnsToAdd) Identical to naturalJoin, but fail if the right side does not produce a match. -
exactJoin
Identical to naturalJoin, but fail if the right side does not produce a match. -
exactJoin
Identical to naturalJoin, but fail if the right side does not produce a match. -
exactJoin
Identical to naturalJoin, but fail if the right side does not produce a match. -
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
default Table aj(Table rightTable, Collection<String> columnsToMatch, Collection<String> columnsToAdd) 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 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
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 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
-
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
default Table raj(Table rightTable, Collection<String> columnsToMatch, Collection<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.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 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"
- 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 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
-
naturalJoin
Augment this table with zero or one row from the right table.The result is somewhat like an Excel vlookup or SQL leftJoin.
- The leftTable always retains the same number of rows and the same columns with which it started.
- If there are no matching values for a row, the appended cell(s) from the rightTable will contain NULL values.
- The right side table can only have one row for each key of the join. If duplicate rows exist on the right side, then the operation's initialization or update results in an error.
When columnsToMatch is empty, then no join keys are used. If there is a row in the right table, it is joined to all rows of the left table. If there are no rows in the right table, then the right columns are null. If there are multiple rows in the right table then there is an error.
- 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 be added to the left side as a result of the match. If empty, then all columns from the right table are added to the result.- Returns:
- a new table joined according to the specification in columnsToMatch and columnsToAdd
-
naturalJoin
default Table naturalJoin(Table rightTable, Collection<String> columnsToMatch, Collection<String> columnsToAdd) Augment this table with zero or one row from the right table.The result is somewhat like an Excel vlookup or SQL leftJoin.
- The leftTable always retains the same number of rows and the same columns with which it started.
- If there are no matching values for a row, the appended cell(s) from the rightTable will contain NULL values.
- The right side table can only have one row for each key of the join. If duplicate rows exist on the right side, then the operation's initialization or update results in an error.
When columnsToMatch is empty, then no join keys are used. If there is a row in the right table, it is joined to all rows of the left table. If there are no rows in the right table, then the right columns are null. If there are multiple rows in the right table then there is an error.
- Parameters:
rightTable
- The right side table on the join.columnsToMatch
- A collection of match conditions ("leftColumn=rightColumn" or "columnFoundInBoth")columnsToAdd
- A collection of the columns from the right side that need to be added to the left side as a result of the match. The column may be optionally renamed with "NewName=NameInRight". If empty, then all columns from the right table are added to the result.- Returns:
- a new table joined according to the specification in columnsToMatch and columnsToAdd
-
naturalJoin
Augment this table with zero or one row from the right table.The result is somewhat like an Excel vlookup or SQL leftJoin.
- The leftTable always retains the same number of rows and the same columns with which it started.
- If there are no matching values for a row, the appended cell(s) from the rightTable will contain NULL values.
- The right side table can only have one row for each key of the join. If duplicate rows exist on the right side, then the operation's initialization or update results in an error.
When columnsToMatch is empty, then no join keys are used. If there is a row in the right table, it is joined to all rows of the left table. If there are no rows in the right table, then the right columns are null. If there are multiple rows in the right table then there is an error.
All columns from the right are added to the result without renames.
- Parameters:
rightTable
- The right side table on the join.columnsToMatch
- A collection of match conditions ("leftColumn=rightColumn" or "columnFoundInBoth")- Returns:
- a new table joined according to the specification in columnsToMatch and columnsToAdd
-
naturalJoin
Augment this table with zero or one row from the right table.The result is somewhat like an Excel vlookup or SQL leftJoin.
- The leftTable always retains the same number of rows and the same columns with which it started.
- If there are no matching values for a row, the appended cell(s) from the rightTable will contain NULL values.
- The right side table can only have one row for each key of the join. If duplicate rows exist on the right side, then the operation's initialization or update results in an error.
When columnsToMatch is empty, then no join keys are used. If there is a row in the right table, it is joined to all rows of the left table. If there are no rows in the right table, then the right columns are null. If there are multiple rows in the right table then there is an error.
- 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. The column may be optionally renamed with "NewName=NameInRight". If empty, then all columns from the right table are added to the result.- Returns:
- a new table joined according to the specification in columnsToMatch and columnsToAdd
-
naturalJoin
Augment this table with zero or one row from the right table.The result is somewhat like an Excel vlookup or SQL leftJoin.
- The leftTable always retains the same number of rows and the same columns with which it started.
- If there are no matching values for a row, the appended cell(s) from the rightTable will contain NULL values.
- The right side table can only have one row for each key of the join. If duplicate rows exist on the right side, then the operation's initialization or update results in an error.
When columnsToMatch is empty, then no join keys are used. If there is a row in the right table, it is joined to all rows of the left table. If there are no rows in the right table, then the right columns are null. If there are multiple rows in the right table then there is an error.
All columns from the right are added to the result without renames.
- 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
-
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(com.illumon.iris.db.tables.Table, com.illumon.iris.db.tables.select.MatchPair[], com.illumon.iris.db.tables.select.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(com.illumon.iris.db.tables.Table, com.illumon.iris.db.tables.select.MatchPair[], com.illumon.iris.db.tables.select.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
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(com.illumon.iris.db.tables.Table, com.illumon.iris.db.tables.select.MatchPair[], com.illumon.iris.db.tables.select.MatchPair[])
.- 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
-
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(com.illumon.iris.db.tables.Table, com.illumon.iris.db.tables.select.MatchPair[], com.illumon.iris.db.tables.select.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
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(com.illumon.iris.db.tables.Table, com.illumon.iris.db.tables.select.MatchPair[], com.illumon.iris.db.tables.select.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.- Returns:
- a new table joined according to the specification in columnsToMatch and columnsToAdd
-
join
default 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(com.illumon.iris.db.tables.Table, com.illumon.iris.db.tables.select.MatchPair[], com.illumon.iris.db.tables.select.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
default Table join(Table rightTable, Collection<String> columnsToMatch, Collection<String> columnsToAdd) 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(com.illumon.iris.db.tables.Table, com.illumon.iris.db.tables.select.MatchPair[], com.illumon.iris.db.tables.select.MatchPair[])
.- Parameters:
rightTable
- The right side table on the join.columnsToMatch
- A collection of match conditions ("leftColumn=rightColumn" or "columnFoundInBoth")columnsToAdd
- A collection 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
default Table join(Table rightTable, Collection<String> columnsToMatch, Collection<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(com.illumon.iris.db.tables.Table, com.illumon.iris.db.tables.select.MatchPair[], com.illumon.iris.db.tables.select.MatchPair[])
.- Parameters:
rightTable
- The right side table on the join.columnsToMatch
- A collection of match conditions ("leftColumn=rightColumn" or "columnFoundInBoth")columnsToAdd
- A collection 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
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(com.illumon.iris.db.tables.Table, com.illumon.iris.db.tables.select.MatchPair[], com.illumon.iris.db.tables.select.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(com.illumon.iris.db.tables.Table, com.illumon.iris.db.tables.select.MatchPair[], com.illumon.iris.db.tables.select.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
-
by
-
by
-
by
-
by
-
by
-
by
-
by
-
headBy
-
headBy
-
headBy
-
tailBy
-
tailBy
-
tailBy
-
applyToAllBy
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 columnsby(SelectColumn[])
-
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 columnsby(SelectColumn...)
-
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 columnsby(String...)
-
applyToAllBy
-
sumBy
Groups the data column according togroupByColumns
and computes the sum for the rest of the fields- Parameters:
groupByColumns
- The grouping columnsby(String...)
-
sumBy
Groups the data column according togroupByColumns
and computes the sum for the rest of the fields- Parameters:
groupByColumns
- The grouping columnsby(String...)
-
sumBy
Groups the data column according togroupByColumns
and computes the sum for the rest of the fields- Parameters:
groupByColumns
- The grouping columnsby(String...)
-
sumBy
Produces a single row table with the sum of each column. When the input table is empty, zero output rows are produced. -
absSumBy
Groups the data column according togroupByColumns
and computes the sum of the absolute values for the rest of the fields- Parameters:
groupByColumns
- The grouping columnsby(String...)
-
absSumBy
Groups the data column according togroupByColumns
and computes the sum of the absolute values for the rest of the fields- Parameters:
groupByColumns
- The grouping columnsby(String...)
-
absSumBy
Groups the data column according togroupByColumns
and computes the sum of the absolute values for the rest of the fields- Parameters:
groupByColumns
- The grouping columnsby(String...)
-
absSumBy
Produces a single row table with the absolute sum of each column. When the input table is empty, zero output rows are produced. -
avgBy
Groups the data column according togroupByColumns
and computes the average for the rest of the fields- Parameters:
groupByColumns
- The grouping columnsby(String...)
-
avgBy
Groups the data column according togroupByColumns
and computes the average for the rest of the fields- Parameters:
groupByColumns
- The grouping columnsby(String...)
-
avgBy
Groups the data column according togroupByColumns
and computes the average for the rest of the fields- Parameters:
groupByColumns
- The grouping columnsby(String...)
-
avgBy
Produces a single row table with the average of each column. When the input table is empty, zero output rows are produced. -
wavgBy
Groups the data column according togroupByColumns
and computes the weighted average using weightColumn for the rest of the fields- Parameters:
weightColumn
- the column to use for the weightgroupByColumns
- The grouping columnsby(String...)
-
wavgBy
Groups the data column according togroupByColumns
and computes the weighted average using weightColumn for the rest of the fields- Parameters:
weightColumn
- the column to use for the weightgroupByColumns
- The grouping columnsby(String...)
-
wavgBy
Groups the data column according togroupByColumns
and computes the weighted average using weightColumn for the rest of the fields- Parameters:
weightColumn
- the column to use for the weightgroupByColumns
- The grouping columnsby(String...)
-
wavgBy
Produces a single row table with the weighted average using weightColumn for the rest of the fields When the input table is empty, zero output rows are produced.- 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 fields If 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.- Parameters:
weightColumn
- the column to use for the weightgroupByColumns
- The grouping columnsby(String...)
-
wsumBy
Computes the weighted sum for all rows in the table using weightColumn for the rest of the fields If 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.- 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 fields If 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.- Parameters:
weightColumn
- the column to use for the weightgroupByColumns
- The grouping columnsby(String...)
-
wsumBy
Groups the data column according togroupByColumns
and computes the weighted sum using weightColumn for the rest of the fields If 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.- Parameters:
weightColumn
- the column to use for the weightgroupByColumns
- The grouping columnsby(String...)
-
stdBy
-
stdBy
Groups the data column according togroupByColumns
and computes the standard deviation for the rest of the fields- Parameters:
groupByColumns
- The grouping columnsby(String...)
-
stdBy
Groups the data column according togroupByColumns
and computes the standard deviation for the rest of the fields- Parameters:
groupByColumns
- The grouping columnsby(String...)
-
stdBy
Produces a single row table with the standard deviation of each column. When the input table is empty, zero output rows are produced. -
varBy
Groups the data column according togroupByColumns
and computes the variance for the rest of the fields- Parameters:
groupByColumns
- The grouping columnsby(String...)
-
varBy
Groups the data column according togroupByColumns
and computes the variance for the rest of the fields- Parameters:
groupByColumns
- The grouping columnsby(String...)
-
varBy
Groups the data column according togroupByColumns
and computes the variance for the rest of the fields- Parameters:
groupByColumns
- The grouping columnsby(String...)
-
varBy
Produces a single row table with the variance of each column. When the input table is empty, zero output rows are produced. -
lastBy
Groups the data column according togroupByColumns
and retrieves the last for the rest of the fields- Parameters:
groupByColumns
- The grouping columnsby(String...)
-
lastBy
Groups the data column according togroupByColumns
and retrieves the last for the rest of the fields- Parameters:
groupByColumns
- The grouping columnsby(String...)
-
lastBy
Groups the data column according togroupByColumns
and retrieves the last for the rest of the fields- Parameters:
groupByColumns
- The grouping columnsby(String...)
-
lastBy
Returns the last row of the given table. -
firstBy
Groups the data column according togroupByColumns
and retrieves the first for the rest of the fields- Parameters:
groupByColumns
- The grouping columnsby(String...)
-
firstBy
Groups the data column according togroupByColumns
and retrieves the first for the rest of the fields- Parameters:
groupByColumns
- The grouping columnsby(String...)
-
firstBy
Groups the data column according togroupByColumns
and retrieves the first for the rest of the fields- Parameters:
groupByColumns
- The grouping columnsby(String...)
-
firstBy
Returns the first row of the given table. -
minBy
Groups the data column according togroupByColumns
and computes the min for the rest of the fields- Parameters:
groupByColumns
- The grouping columnsby(String...)
-
minBy
Groups the data column according togroupByColumns
and computes the min for the rest of the fields- Parameters:
groupByColumns
- The grouping columnsby(String...)
-
minBy
Groups the data column according togroupByColumns
and computes the min for the rest of the fields- Parameters:
groupByColumns
- The grouping columnsby(String...)
-
minBy
Produces a single row table with the minimum of each column. When the input table is empty, zero output rows are produced. -
maxBy
Groups the data column according togroupByColumns
and computes the max for the rest of the fields- Parameters:
groupByColumns
- The grouping columnsby(String...)
}
-
maxBy
Groups the data column according togroupByColumns
and computes the max for the rest of the fields- Parameters:
groupByColumns
- The grouping columnsby(String...)
}
-
maxBy
Groups the data column according togroupByColumns
and computes the max for the rest of the fields- Parameters:
groupByColumns
- The grouping columnsby(String...)
}
-
maxBy
Produces a single row table with the maximum of each column. When the input table is empty, zero output rows are produced. -
medianBy
Groups the data column according togroupByColumns
and computes the median for the rest of the fields- Parameters:
groupByColumns
- The grouping columnsby(String...)
}
-
medianBy
Groups the data column according togroupByColumns
and computes the median for the rest of the fields- Parameters:
groupByColumns
- The grouping columnsby(String...)
}
-
medianBy
Groups the data column according togroupByColumns
and computes the median for the rest of the fields- Parameters:
groupByColumns
- The grouping columnsby(String...)
}
-
medianBy
Produces a single row table with the median of each column. When the input table is empty, zero output rows are produced. -
countBy
-
countBy
-
countBy
-
countBy
-
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
-
ungroup
-
byExternal
Create aTableMap
from this table, keyed by the specified columns.The returned TableMap contains each row in this table in exactly one of the tables within the map. If you have exactly one key column the TableMap is keyed by the value in that column. If you have zero key columns, then the TableMap is keyed by
com.fishlib.datastructures.util.SmartKey.EMPTY
(and will contain this table as the value). If you have multiple key columns, then the TableMap is keyed by acom.fishlib.datastructures.util.SmartKey
. The SmartKey will have one value for each of your column values, in the order specified by keyColumnNames.For example if you have a Table keyed by a String column named USym, and a DBDateTime column named Expiry; a value could be retrieved from the TableMap with
tableMap.get(new SmartKey("SPY";, DBTimeUtils.convertDateTime("2020-06-19T16:15:00 NY")))
. For a table with an Integer column named Bucket, you simply use the desired value as intableMap.get(1)
.- Parameters:
dropKeys
- if true, drop key columns in the output TableskeyColumnNames
- the name of the key columns to use.- Returns:
- a TableMap keyed by keyColumnNames
-
byExternal
Create aTableMap
from this table, keyed by the specified columns.The returned TableMap contains each row in this table in exactly one of the tables within the map. If you have exactly one key column the TableMap is keyed by the value in that column. If you have zero key columns, then the TableMap is keyed by
com.fishlib.datastructures.util.SmartKey.EMPTY
(and will contain this table as the value). If you have multiple key columns, then the TableMap is keyed by acom.fishlib.datastructures.util.SmartKey
. The SmartKey will have one value for each of your column values, in the order specified by keyColumnNames.For example if you have a Table keyed by a String column named USym, and a DBDateTime column named Expiry; a value could be retrieved from the TableMap with
tableMap.get(new SmartKey("SPY";, DBTimeUtils.convertDateTime("2020-06-19T16:15:00 NY")))
. For a table with an Integer column named Bucket, you simply use the desired value as intableMap.get(1)
.- Parameters:
keyColumnNames
- the name of the key columns to use.- Returns:
- a TableMap keyed by keyColumnNames
-
rollup
default HierarchicalTable rollup(ComboAggregateFactory comboAggregateFactory, 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:
comboAggregateFactory
- the ComboAggregateFactory describing the aggregationcolumns
- the columns to group by- Returns:
- a hierarchical table with the rollup applied
-
rollup
default HierarchicalTable rollup(ComboAggregateFactory comboAggregateFactory, 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:
comboAggregateFactory
- the ComboAggregateFactory describing the aggregationincludeConstituents
- 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:
comboAggregateFactory
- the ComboAggregateFactory describing the aggregationcolumns
- the columns to group by- Returns:
- a hierarchical table with the rollup applied
-
rollup
default HierarchicalTable rollup(ComboAggregateFactory comboAggregateFactory, 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:
comboAggregateFactory
- the ComboAggregateFactory describing the aggregationcolumns
- 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
default HierarchicalTable rollup(ComboAggregateFactory comboAggregateFactory, SelectColumn... 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:
comboAggregateFactory
- the ComboAggregateFactory describing the aggregationcolumns
- 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:
comboAggregateFactory
- the ComboAggregateFactory describing the aggregation- Returns:
- a hierarchical table with the rollup applied
-
rollup
default HierarchicalTable rollup(ComboAggregateFactory comboAggregateFactory, boolean includeConstituents) Create a rollup table. A rollup table aggregates all rows of the table.- Parameters:
comboAggregateFactory
- the ComboAggregateFactory describing the aggregationincludeConstituents
- set to true to include the constituent rows at the leaf level- Returns:
- a hierarchical table with the rollup applied
-
rollup
HierarchicalTable rollup(ComboAggregateFactory comboAggregateFactory, boolean includeConstituents, SelectColumn... 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
Table updateBy(@NotNull UpdateByControl control, @NotNull Collection<UpdateByClause> operations, MatchPair... byColumns) Create a table with the same
index
as it's 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.- 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
@FinalDefault default Table updateBy(@NotNull Collection<UpdateByClause> operations, String... byColumns) Create a table with the same
index
as it's 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- 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
Create a table with the same
index
as it's 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.- 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
Create a table with the same
index
as it's parent that will perform the specified row based operation to it. This operation will additionally group the table by a set of keys before applying the operation.- 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
Create a table with the same
index
as it's parent that will perform the specified row based operation to it. This operation will additionally group the table by a set of keys before applying the operation.- 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
Create a table with the same
index
as it's parent that will perform the specified set of row based operation to it.- 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
-
sort
-
sort
-
sort
-
sortDescending
-
sortDescending
-
reverse
Table reverse() -
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
Table 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
Snapshot "rightTable", triggered by "this" 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) of this Table's columns. The remaining columns in the result table come from "rightTable", the table being snapshotted.- Parameters:
rightTable
- 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
-
snapshotIncremental
-
snapshotIncremental
-
snapshotHistory
-
apply
Applies a function to this table.This is useful if you have a reference to a table, or a proxy; but not the database 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 LTM is not required the
Function.Unary.call(Object)
method should be annotated withAsyncMethod
.
-
isFlat
boolean isFlat()Return true if this table is guaranteed to be flat. The index of a flat table will be from 0...numRows-1. -
flatten
Table flatten()Creates a version of this table with a flat index (V2 only). -
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
-
layoutHints
-
layoutHints
-
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.
-
setTotalsTable
Sets parameters for the default totals table display.- Parameters:
builder
- aTotalsTableBuilder
object- Returns:
- a table with the totals applied
-
setColumnRenderers
Sets renderers for columns.- Parameters:
builder
- a builder that creates the packed string for the attribute- Returns:
- The same table with the ColumnRenderes attribute set
-
close
default 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
default 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()
. -
preemptiveUpdatesTable
-
preemptiveSnapshotTable
-
preemptiveSnapshotTable
-
subscribeToPreemptiveUpdates
Called on client side of a preemptive table to create the replicated table which represents the server side preemptive table. -
getViewPort
Called on client side of a preemptive table to create the replicated table which represents the server side preemptive table, but instead of looking at the whole table, we're just interested in the slice we can see on the screen. -
supportsPreemptiveSubscription
default boolean supportsPreemptiveSubscription()Returns true for client side tables where subscribeToPreemptiveUpdates should return a ReplicatedTable. -
deflate
Description copied from interface:Deflatable
Convert this object into an Inflatable suitable for serialization.- Specified by:
deflate
in interfaceDeflatable<Table>
- Parameters:
client
- the ExportedObjectClient we are deflating for.- Returns:
- an Inflatable for serializing to the client
-
deflate
default Inflatable<Table> deflate(@NotNull ExportedObjectClient client, boolean preSubscribed, boolean preSubscribedViewport) Deflate, but provide an extra boolean telling us whether we are presubscribing this preemptive table.- Parameters:
client
- the client that we are deflating forpreSubscribed
- if the resultant table will have a preemptive subscription right off the batpreSubscribedViewport
- if the pre-subscription is a viewport (otherwise it is a full subscription)- Returns:
- an inflatable that maybe be presubscribed
-