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 Details

    • allowKeyOnlySubstitution

      default boolean allowKeyOnlySubstitution()
      Should we allow substitution with a KeyOnlyAggregationFactory (e.g. selectDistinct) when there are only key columns? Instances whose operators could have side effects or are already KeyOnlyAggregationFactory 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 an AggregationContext for this aggregation.
      Parameters:
      table - The source Table to aggregate
      groupByColumns - The key column names
      Returns:
      A new or safely reusable AggregationContext