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 booleanallowKeyOnlySubstitution()Should we allow substitution with aKeyOnlyAggregationFactory(e.g.static QueryTableapplyToAllBy(AggregationControl aggregationControl, QueryTable inputTable, String formula, String columnParamName, SelectColumn[] groupByColumns)static QueryTableapplyToAllBy(AggregationControl aggregationControl, QueryTable inputTable, String formula, String columnParamName, String... groupByColumnNames)static QueryTableapplyToAllBy(QueryTable inputTable, String formula, String columnParamName, SelectColumn[] groupByColumns)static QueryTableapplyToAllBy(QueryTable inputTable, String formula, String columnParamName, String... groupByColumnNames)com.illumon.iris.db.v2.by.AggregationContextmakeAggregationContext(Table inputTable, String... groupByColumnNames)Make anAggregationContextfor this aggregation.StringtoString()
-
Constructor Details
-
Method Details
-
allowKeyOnlySubstitution
public boolean allowKeyOnlySubstitution()Description copied from interface:AggregationContextFactoryShould 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.- Specified by:
allowKeyOnlySubstitutionin interfaceAggregationContextFactory- Returns:
- Whether to allow a
KeyOnlyAggregationFactoryto 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:AggregationContextFactoryMake anAggregationContextfor this aggregation.- Specified by:
makeAggregationContextin interfaceAggregationContextFactory- Parameters:
inputTable- The sourceTableto 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)
-