Class AggregationProcessor
java.lang.Object
io.deephaven.engine.table.impl.by.AggregationProcessor
- All Implemented Interfaces:
AggregationContextFactory
Conversion tool to generate an
AggregationContextFactory
for a collection of aggregations
.-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic AggregationContextFactory
forAggregation
(@NotNull Collection<? extends Aggregation> aggregations) Convert a collection ofaggregations
to anAggregationContextFactory
.static AggregationContextFactory
Create a trivialAggregationContextFactory
togroup
the input table and expose the grouprow sets
asEXPOSED_GROUP_ROW_SETS
.static AggregationContextFactory
forRollupBase
(@NotNull Collection<? extends Aggregation> aggregations, boolean includeConstituents, @NotNull ColumnName rollupColumn) Convert a collection ofaggregations
to anAggregationContextFactory
for use in computing the base level of a rollup.static AggregationContextFactory
forRollupReaggregated
(@NotNull Collection<? extends Aggregation> aggregations, @NotNull Map<String, Class<?>> nullColumns, @NotNull ColumnName rollupColumn) Convert a collection ofaggregations
to anAggregationContextFactory
for use in computing a reaggregated level of a rollup.static AggregationContextFactory
Create a trivialAggregationContextFactory
to implementselect distinct
.static AggregationContextFactory
Create a trivialAggregationContextFactory
to implement source-row lookup functionality fortree
.static AggregationRowLookup
getRowLookup
(@NotNull Table aggregationResult) makeAggregationContext
(@NotNull Table table, boolean requireStateChangeRecorder, @NotNull String... groupByColumnNames) Make anAggregationContext
for this aggregation.toString()
-
Field Details
-
EXPOSED_GROUP_ROW_SETS
-
-
Method Details
-
forAggregation
public static AggregationContextFactory forAggregation(@NotNull @NotNull Collection<? extends Aggregation> aggregations) Convert a collection ofaggregations
to anAggregationContextFactory
.- Parameters:
aggregations
- Theaggregations
. Must not be further mutated by the caller. Will not be mutated byAggregationProcessor
.- Returns:
- The
AggregationContextFactory
-
forRollupBase
public static AggregationContextFactory forRollupBase(@NotNull @NotNull Collection<? extends Aggregation> aggregations, boolean includeConstituents, @NotNull @NotNull ColumnName rollupColumn) Convert a collection ofaggregations
to anAggregationContextFactory
for use in computing the base level of a rollup.- Parameters:
aggregations
- Theaggregations
. Must not be further mutated by the caller. Will not be mutated byAggregationProcessor
.includeConstituents
- Whether constituents should be included via a partition aggregation- Returns:
- The
AggregationContextFactory
-
forRollupReaggregated
public static AggregationContextFactory forRollupReaggregated(@NotNull @NotNull Collection<? extends Aggregation> aggregations, @NotNull @NotNull Map<String, Class<?>> nullColumns, @NotNull @NotNull ColumnName rollupColumn) Convert a collection ofaggregations
to anAggregationContextFactory
for use in computing a reaggregated level of a rollup.- Parameters:
aggregations
- Theaggregations
. Must not be further mutated by the caller. Will not be mutated byAggregationProcessor
.nullColumns
- Map of group-by column names and data types to aggregate with a null-column aggregation- Returns:
- The
AggregationContextFactory
-
forTreeSourceRowLookup
Create a trivialAggregationContextFactory
to implement source-row lookup functionality fortree
.- Returns:
- The
AggregationContextFactory
-
forSelectDistinct
Create a trivialAggregationContextFactory
to implementselect distinct
.- Returns:
- The
AggregationContextFactory
-
forExposeGroupRowSets
Create a trivialAggregationContextFactory
togroup
the input table and expose the grouprow sets
asEXPOSED_GROUP_ROW_SETS
.- Returns:
- The
AggregationContextFactory
-
toString
-
makeAggregationContext
public AggregationContext makeAggregationContext(@NotNull @NotNull Table table, boolean requireStateChangeRecorder, @NotNull @NotNull String... groupByColumnNames) Description copied from interface:AggregationContextFactory
Make anAggregationContext
for this aggregation.- Specified by:
makeAggregationContext
in interfaceAggregationContextFactory
- Parameters:
table
- The sourceTable
to aggregaterequireStateChangeRecorder
- Whether the resulting context is required to have an operator that extendsStateChangeRecorder
groupByColumnNames
- The key column names- Returns:
- A new or safely reusable
AggregationContext
-
getRowLookup
-