Package com.illumon.iris.db.v2.by
Class FormulaAggregationFactory
java.lang.Object
com.illumon.iris.db.v2.by.FormulaAggregationFactory
- All Implemented Interfaces:
AggregationContextFactory
public class FormulaAggregationFactory extends Object implements AggregationContextFactory
An
AggregationContextFactory
used in the implementation of Table.applyToAllBy(java.lang.String, java.lang.String, com.illumon.iris.db.v2.select.SelectColumn...)
.-
Constructor Summary
Constructors Constructor Description FormulaAggregationFactory(String formula, String columnParamName)
-
Method Summary
Modifier and Type Method Description boolean
allowKeyOnlySubstitution()
Should we allow substitution with aKeyOnlyAggregationFactory
(e.g.static QueryTable
applyToAllBy(AggregationControl aggregationControl, QueryTable inputTable, String formula, String columnParamName, SelectColumn[] groupByColumns)
static QueryTable
applyToAllBy(AggregationControl aggregationControl, QueryTable inputTable, String formula, String columnParamName, String... groupByColumnNames)
static QueryTable
applyToAllBy(QueryTable inputTable, String formula, String columnParamName, SelectColumn[] groupByColumns)
static QueryTable
applyToAllBy(QueryTable inputTable, String formula, String columnParamName, String... groupByColumnNames)
com.illumon.iris.db.v2.by.AggregationContext
makeAggregationContext(Table inputTable, String... groupByColumnNames)
Make anAggregationContext
for this aggregation.String
toString()
-
Constructor Details
-
Method Details
-
allowKeyOnlySubstitution
public boolean allowKeyOnlySubstitution()Description copied from interface:AggregationContextFactory
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.- Specified by:
allowKeyOnlySubstitution
in interfaceAggregationContextFactory
- Returns:
- Whether to allow a
KeyOnlyAggregationFactory
to be substituted for this when there are only key columns
-
makeAggregationContext
public com.illumon.iris.db.v2.by.AggregationContext makeAggregationContext(@NotNull Table inputTable, @NotNull String... groupByColumnNames)Description copied from interface:AggregationContextFactory
Make anAggregationContext
for this aggregation.- Specified by:
makeAggregationContext
in interfaceAggregationContextFactory
- Parameters:
inputTable
- The sourceTable
to aggregategroupByColumnNames
- The key column names- Returns:
- A new or safely reusable
AggregationContext
-
toString
-
applyToAllBy
public static QueryTable applyToAllBy(@NotNull QueryTable inputTable, @NotNull String formula, @NotNull String columnParamName, @NotNull String... groupByColumnNames) -
applyToAllBy
public static QueryTable applyToAllBy(@NotNull QueryTable inputTable, @NotNull String formula, @NotNull String columnParamName, @NotNull SelectColumn[] groupByColumns) -
applyToAllBy
public static QueryTable applyToAllBy(@NotNull AggregationControl aggregationControl, @NotNull QueryTable inputTable, @NotNull String formula, @NotNull String columnParamName, @NotNull String... groupByColumnNames) -
applyToAllBy
public static QueryTable applyToAllBy(@NotNull AggregationControl aggregationControl, @NotNull QueryTable inputTable, @NotNull String formula, @NotNull String columnParamName, @NotNull SelectColumn[] groupByColumns)
-