Interface RollupTable
- All Superinterfaces:
AttributeMap<RollupTable>,GridAttributes<RollupTable>,HierarchicalTable<RollupTable>,LivenessReferent
- All Known Implementing Classes:
RollupTableImpl
Interface for the result of
rollup operations.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceRecorder for node-level operations to be applied when gathering snapshots.static enumNode types for a rollup.Nested classes/interfaces inherited from interface io.deephaven.engine.table.hierarchical.HierarchicalTable
HierarchicalTable.SnapshotState -
Field Summary
Fields inherited from interface io.deephaven.engine.table.GridAttributes
COLUMN_DESCRIPTIONS_ATTRIBUTE, DESCRIPTION_ATTRIBUTE, LAYOUT_HINTS_ATTRIBUTE, SORTABLE_COLUMNS_ATTRIBUTEFields inherited from interface io.deephaven.engine.table.hierarchical.HierarchicalTable
KEY_TABLE_ACTION_CONTRACT, KEY_TABLE_ACTION_EXPAND, KEY_TABLE_ACTION_EXPAND_ALL -
Method Summary
Modifier and TypeMethodDescriptionCollection<? extends Aggregation>Get the aggregations for therollupoperation.Collection<? extends ColumnName>Get the group-by columns for therollupoperation.default RollupTable.NodeTypeGet theRollupTable.NodeTypeat this RollupTable's leaf level.getNodeDefinition(@NotNull RollupTable.NodeType nodeType) Get theTableDefinitionthat should be exposed to node table consumers, e.g.booleanAre the source table's constituent rows included at the lowest level of the rollup?makeNodeOperationsRecorder(@NotNull RollupTable.NodeType nodeType) Get arecorderfor per-node operations to apply during snapshots of the requestedRollupTable.NodeType.Create a new RollupTable based onnewSource, inheriting this RollupTable'saggregations,constituent inclusion,group-by columns,node operations, andfilters.translateAggregatedNodeOperationsForConstituentNodes(RollupTable.NodeOperationsRecorder aggregatedNodeOperationsToTranslate) Translate node operations for aggregated nodes to the closest equivalent for a constituent node.withFilter(Filter filter) Apply a filter to the source table for this RollupTable before applying the rollup operation.withNodeOperations(@NotNull RollupTable.NodeOperationsRecorder... nodeOperations) Get a new RollupTable that will apply therecordedoperations to nodes when gathering snapshots.withUpdateView(String... columns) Apply a view to this RollupTable in order to produce a new RollupTable with additional columns at the aggregated node level.withUpdateView(Collection<Selectable> columns) Apply a view to this RollupTable in order to produce a new RollupTable with additional columns at the aggregated node level.Methods inherited from interface io.deephaven.engine.table.AttributeMap
getAttribute, getAttributeKeys, getAttributes, getAttributes, hasAttribute, retainingAttributes, withAttributes, withAttributes, withoutAttributesMethods inherited from interface io.deephaven.engine.table.GridAttributes
clearSortingRestrictions, restrictSortTo, setLayoutHints, withColumnDescription, withColumnDescriptions, withDescriptionMethods inherited from interface io.deephaven.engine.table.hierarchical.HierarchicalTable
getAvailableColumnDefinitions, getDescription, getEmptyExpansionsTable, getRoot, getRowDepthColumn, getRowExpandedColumn, getSource, getStructuralColumnDefinitions, makeSnapshotState, snapshotMethods inherited from interface io.deephaven.engine.liveness.LivenessReferent
dropReference, getReferentDescription, getWeakReference, retainReference, tryRetainReference
-
Method Details
-
getAggregations
Collection<? extends Aggregation> getAggregations()Get the aggregations for therollupoperation.- Returns:
- The rollup aggregations
-
includesConstituents
boolean includesConstituents()Are the source table's constituent rows included at the lowest level of the rollup?- Returns:
- Whether constituents are included
-
getLeafNodeType
Get theRollupTable.NodeTypeat this RollupTable's leaf level.- Returns:
- The leaf node type
-
getGroupByColumns
Collection<? extends ColumnName> getGroupByColumns()Get the group-by columns for therollupoperation.- Returns:
- The group-by columns
-
getNodeDefinition
Get theTableDefinitionthat should be exposed to node table consumers, e.g. UI-driven snapshots. This excludes "internal" columns used to organize the rollup or support operations, as well as therow-depth columnandrow-expanded column, but includes formatting columns.- Parameters:
nodeType- Thenode typeto get theTableDefinitionfor- Returns:
- The externally-visible node
TableDefinitionfor the requestednodeType - Throws:
IllegalArgumentException- IfConstituentis specified whenincludesConstituents() == false
-
withFilter
Apply a filter to the source table for this RollupTable before applying the rollup operation. This filter must use only non-aggregate columns and must not use column arrays.- Parameters:
filter- The filter to apply; must only reference non-aggregate columns and must not use column arrays- Returns:
- The new RollupTable
-
withUpdateView
Apply a view to this RollupTable in order to produce a new RollupTable with additional columns at the aggregated node level.- Parameters:
columns- The new columns to add- Returns:
- The new RollupTable
-
withUpdateView
Apply a view to this RollupTable in order to produce a new RollupTable with additional columns at the aggregated node level.- Parameters:
columns- The new columns to add- Returns:
- The new RollupTable
-
makeNodeOperationsRecorder
RollupTable.NodeOperationsRecorder makeNodeOperationsRecorder(@NotNull @NotNull RollupTable.NodeType nodeType) Get arecorderfor per-node operations to apply during snapshots of the requestedRollupTable.NodeType.- Parameters:
nodeType- Thenode typethat operations will be applied to- Returns:
- The new recorder
- Throws:
IllegalArgumentException- IfConstituentis specified whenincludesConstituents() == false
-
withNodeOperations
RollupTable withNodeOperations(@NotNull @NotNull RollupTable.NodeOperationsRecorder... nodeOperations) Get a new RollupTable that will apply therecordedoperations to nodes when gathering snapshots. Operations will be applied only to thenode typesupplied when the elements ofnodeOperationswere initiallycreated.- Parameters:
nodeOperations- The node-level operations to apply. Elements must have been initially supplied bymakeNodeOperationsRecorder(NodeType)fromthisRollupTable.- Returns:
- The new RollupTable
-
translateAggregatedNodeOperationsForConstituentNodes
RollupTable.NodeOperationsRecorder translateAggregatedNodeOperationsForConstituentNodes(@NotNull RollupTable.NodeOperationsRecorder aggregatedNodeOperationsToTranslate) Translate node operations for aggregated nodes to the closest equivalent for a constituent node. May only be invoked ifincludesConstituents() == true.- Parameters:
aggregatedNodeOperationsToTranslate- Node-level operations for aggregated nodes, initially supplied bymakeNodeOperationsRecorder(NodeType.Aggregated).- Returns:
- Node-level operations for constituent nodes
-
rebase
Create a new RollupTable based onnewSource, inheriting this RollupTable'saggregations,constituent inclusion,group-by columns,node operations, andfilters.- Parameters:
newSource- A new source table that must have the same definition as the source of this rollup; that isnewSource.getDefinition().equals(getSource().getDefinition())must betrue- Returns:
- The new RollupTable
-