Package com.illumon.iris.db.v2.by
Interface AggregationContextFactory
- All Known Implementing Classes:
ByAggregationFactory
,ByExternalAggregationFactory
,CountAggregationFactory
,FirstOrLastByAggregationFactory
,FormulaAggregationFactory
,FreezeByAggregationFactory
,KeyOnlyAggregationFactory
,NonKeyColumnAggregationFactory
,SortedFirstOrLastByAggregationFactory
,WeightedAverageSumAggregationFactory
public interface AggregationContextFactory
Produces an AggregationContext for aggregations given a table and the names of the group by columns.
-
Method Summary
Modifier and Type Method Description default boolean
allowKeyOnlySubstitution()
Should we allow substitution with aKeyOnlyAggregationFactory
(e.g.com.illumon.iris.db.v2.by.AggregationContext
makeAggregationContext(Table table, String... groupByColumns)
Make anAggregationContext
for this aggregation.
-
Method Details
-
allowKeyOnlySubstitution
default boolean allowKeyOnlySubstitution()Should we allow substitution with aKeyOnlyAggregationFactory
(e.g. selectDistinct) when there are only key columns? Instances whose operators could have side effects or are alreadyKeyOnlyAggregationFactory
should return false.- Returns:
- Whether to allow a
KeyOnlyAggregationFactory
to be substituted for this when there are only key columns
-
makeAggregationContext
com.illumon.iris.db.v2.by.AggregationContext makeAggregationContext(@NotNull Table table, @NotNull String... groupByColumns)Make anAggregationContext
for this aggregation.- Parameters:
table
- The sourceTable
to aggregategroupByColumns
- The key column names- Returns:
- A new or safely reusable
AggregationContext
-