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 TypeMethodDescriptiondefault booleanShould we allow substitution with aKeyOnlyAggregationFactory(e.g.com.illumon.iris.db.v2.by.AggregationContextmakeAggregationContext(Table table, String... groupByColumns) Make anAggregationContextfor 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 alreadyKeyOnlyAggregationFactoryshould return false.- Returns:
- Whether to allow a
KeyOnlyAggregationFactoryto 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 anAggregationContextfor this aggregation.- Parameters:
table- The sourceTableto aggregategroupByColumns- The key column names- Returns:
- A new or safely reusable
AggregationContext
-