deephaven.ComboAggregateFactory

The ComboAggregateFactory combines one or more aggregations into an operator for use with Table.by(AggregationStateFactory).

The intended use of this class is to call the ComboAggregateFactory.AggCombo(ComboBy…) method with a set of aggregations defined by:

  • ComboAggregateFactory.AggMin(java.lang.String…)

  • ComboAggregateFactory.AggMax(java.lang.String…)

  • ComboAggregateFactory.AggSum(java.lang.String…)

  • ComboAggregateFactory.AggAbsSum(java.lang.String…)

  • ComboAggregateFactory.AggVar(java.lang.String…)

  • ComboAggregateFactory.AggAvg(java.lang.String…)

  • ComboAggregateFactory.AggWAvg(java.lang.String, java.lang.String…)

  • ComboAggregateFactory.AggWSum(java.lang.String, java.lang.String…)

  • ComboAggregateFactory.AggMed(java.lang.String…)

  • ComboAggregateFactory.AggPct(double, java.lang.String…)

  • ComboAggregateFactory.AggStd(java.lang.String…)

  • ComboAggregateFactory.AggFirst(java.lang.String…)

  • ComboAggregateFactory.AggLast(java.lang.String…)

  • ComboAggregateFactory.AggCount(java.lang.String)

  • ComboAggregateFactory.AggCountDistinct(java.lang.String…)

  • ComboAggregateFactory.AggDistinct(java.lang.String…)

  • ComboAggregateFactory.AggArray(java.lang.String…)

For example, to produce a table with several aggregations on the LastPrice of a Trades table:

ohlc=trades.by(AggCombo(AggFirst(“Open=LastPrice”), AggLast(“Close=LastPrice”), AggMax(“High=LastPrice”), AggMin(“Low=LastPrice”), AggSum(“Volume=Size”), AggWAvg(“Size”, “VWAP=LastPrice”), “Symbol”)

Agg(*args)

Create an aggregation.

Overload 1
param factory

(com.illumon.iris.db.v2.by.AggregationStateFactoryImpl) - aggregation factory.

param matchPairs

(java.lang.String…) - the columns to apply the aggregation to in the form Output=Input, if the Output and Input have the same name, then the column name can be specified.

return

(com.illumon.iris.db.v2.by.ComboAggregateFactory.ComboBy) a ComboBy object suitable for passing to ComboAggregateFactory.AggCombo(ComboBy…)

Overload 2
param factoryType

(com.illumon.iris.db.v2.by.AggType) - aggregation factory type.

param matchPairs

(java.lang.String…) - the columns to apply the aggregation to in the form Output=Input, if the Output and Input have the same name, then the column name can be specified.

return

(com.illumon.iris.db.v2.by.ComboAggregateFactory.ComboBy) a ComboBy object suitable for passing to ComboAggregateFactory.AggCombo(ComboBy…)

AggAbsSum(*matchPairs)

Create an absolute sum aggregation, equivalent to Table.absSumBy(String…).

Parameters

matchPairs – (java.lang.String…) - the columns to apply the aggregation to in the form Output=Input, if the Output and Input have the same name, then the column name can be specified.

Returns

(com.illumon.iris.db.v2.by.ComboAggregateFactory.ComboBy) a ComboBy object suitable for passing to ComboAggregateFactory.AggCombo(ComboBy…)

AggArray(*matchPairs)

Create an array aggregation, equivalent to Table.by(String…).

Parameters

matchPairs – (java.lang.String…) - the columns to apply the aggregation to in the form Output=Input, if the Output and Input have the same name, then the column name can be specified.

Returns

(com.illumon.iris.db.v2.by.ComboAggregateFactory.ComboBy) a ComboBy object suitable for passing to ComboAggregateFactory.AggCombo(ComboBy…)

AggAvg(*matchPairs)

Create an average aggregation, equivalent to Table.avgBy(String…).

Parameters

matchPairs – (java.lang.String…) - the columns to apply the aggregation to in the form Output=Input, if the Output and Input have the same name, then the column name can be specified.

Returns

(com.illumon.iris.db.v2.by.ComboAggregateFactory.ComboBy) a ComboBy object suitable for passing to ComboAggregateFactory.AggCombo(ComboBy…)

AggCombo(*aggregations)

Create a new ComboAggregateFactory suitable for passing to Table.by(AggregationStateFactory, String…).

Parameters

aggregations – (com.illumon.iris.db.v2.by.ComboAggregateFactory.ComboBy…) - the aggregations to compute

Returns

(com.illumon.iris.db.v2.by.ComboAggregateFactory) a new table with the specified aggregations.

AggCount(resultColumn)

Create an count aggregation, equivalent to Table.countBy(String).

Parameters

resultColumn – (java.lang.String) - the name of the result column containing the count of each group

Returns

(com.illumon.iris.db.v2.by.ComboAggregateFactory.ComboBy) a ComboBy object suitable for passing to ComboAggregateFactory.AggCombo(ComboBy…)

AggCountDistinct(*args)

Create a distinct count aggregation.

The output column contains the number of distinct values for the input column in that group.

Overload 1
param matchPairs

(java.lang.String…) - the columns to apply the aggregation to in the form Output=Input, if the Output and Input have the same name, then the column name can be specified.

return

(com.illumon.iris.db.v2.by.ComboAggregateFactory.ComboBy) a ComboBy object suitable for passing to ComboAggregateFactory.AggCombo(ComboBy…). Null values are not counted.

Overload 2
param countNulls

(boolean) - if true null values are counted as a distinct value, otherwise null values are ignored

param matchPairs

(java.lang.String…) - the columns to apply the aggregation to in the form Output=Input, if the Output and Input have the same name, then the column name can be specified.

return

(com.illumon.iris.db.v2.by.ComboAggregateFactory.ComboBy) a ComboBy object suitable for passing to ComboAggregateFactory.AggCombo(ComboBy…)

AggDistinct(*args)

Create a distinct aggregation.

The output column contains a DbArrayBase with the distinct values for the input column within the group.

Overload 1
param matchPairs

(java.lang.String…) - the columns to apply the aggregation to in the form Output=Input, if the Output and Input have the same name, then the column name can be specified.

return

(com.illumon.iris.db.v2.by.ComboAggregateFactory.ComboBy) a ComboBy object suitable for passing to ComboAggregateFactory.AggCombo(ComboBy…). Null values are ignored.

Overload 2
param countNulls

(boolean) - if true, then null values are included in the result, otherwise null values are ignored

param matchPairs

(java.lang.String…) - the columns to apply the aggregation to in the form Output=Input, if the Output and Input have the same name, then the column name can be specified.

return

(com.illumon.iris.db.v2.by.ComboAggregateFactory.ComboBy) a ComboBy object suitable for passing to ComboAggregateFactory.AggCombo(ComboBy…)

AggFirst(*matchPairs)

Create a first aggregation, equivalent to Table.firstBy(String…).

Parameters

matchPairs – (java.lang.String…) - the columns to apply the aggregation to in the form Output=Input, if the Output and Input have the same name, then the column name can be specified.

Returns

(com.illumon.iris.db.v2.by.ComboAggregateFactory.ComboBy) a ComboBy object suitable for passing to ComboAggregateFactory.AggCombo(ComboBy…)

AggFormula(formula, formulaParam, *matchPairs)

Create a formula aggregation.

Parameters
  • formula – (java.lang.String) - the formula to apply to each group

  • formulaParam – (java.lang.String) - the parameter name within the formula

  • matchPairs – (java.lang.String…) - the columns to apply the aggregation to in the form Output=Input, if the Output and Input have the same name, then the column name can be specified.

Returns

(com.illumon.iris.db.v2.by.ComboAggregateFactory.ComboBy) a ComboBy object suitable for passing to ComboAggregateFactory.AggCombo(ComboBy…)

AggLast(*matchPairs)

Create a last aggregation, equivalent to Table.lastBy(String…).

Parameters

matchPairs – (java.lang.String…) - the columns to apply the aggregation to in the form Output=Input, if the Output and Input have the same name, then the column name can be specified.

Returns

(com.illumon.iris.db.v2.by.ComboAggregateFactory.ComboBy) a ComboBy object suitable for passing to ComboAggregateFactory.AggCombo(ComboBy…)

AggMax(*matchPairs)

Create a maximum aggregation, equivalent to Table.maxBy(String…).

Parameters

matchPairs – (java.lang.String…) - the columns to apply the aggregation to in the form Output=Input, if the Output and Input have the same name, then the column name can be specified.

Returns

(com.illumon.iris.db.v2.by.ComboAggregateFactory.ComboBy) a ComboBy object suitable for passing to ComboAggregateFactory.AggCombo(ComboBy…)

AggMed(*matchPairs)

Create a median aggregation, equivalent to Table.medianBy(String…).

Parameters

matchPairs – (java.lang.String…) - the columns to apply the aggregation to in the form Output=Input, if the Output and Input have the same name, then the column name can be specified.

Returns

(com.illumon.iris.db.v2.by.ComboAggregateFactory.ComboBy) a ComboBy object suitable for passing to ComboAggregateFactory.AggCombo(ComboBy…)

AggMin(*matchPairs)

Create a minimum aggregation, equivalent to Table.minBy(String…).

Parameters

matchPairs – (java.lang.String…) - the columns to apply the aggregation to in the form Output=Input, if the Output and Input have the same name, then the column name can be specified.

Returns

(com.illumon.iris.db.v2.by.ComboAggregateFactory.ComboBy) a ComboBy object suitable for passing to ComboAggregateFactory.AggCombo(ComboBy…)

AggPct(*args)

Create a percentile aggregation.

Overload 1
param percentile

(double) - the percentile to calculate

param matchPairs

(java.lang.String…) - the columns to apply the aggregation to in the form Output=Input, if the Output and Input have the same name, then the column name can be specified.

return

(com.illumon.iris.db.v2.by.ComboAggregateFactory.ComboBy) a ComboBy object suitable for passing to ComboAggregateFactory.AggCombo(ComboBy…)

Overload 2
param percentile

(double) - the percentile to calculate

param averageMedian

(boolean) - if true, then when the upper values and lower values have an equal size; average the highest lower value and lowest upper value to produce the median value for integers, longs, doubles, and floats

param matchPairs

(java.lang.String…) - the columns to apply the aggregation to in the form Output=Input, if the Output and Input have the same name, then the column name can be specified.

return

(com.illumon.iris.db.v2.by.ComboAggregateFactory.ComboBy) a ComboBy object suitable for passing to ComboAggregateFactory.AggCombo(ComboBy…)

AggStd(*matchPairs)

Create a standard deviation aggregation, equivalent to Table.stdBy(String…).

Parameters

matchPairs – (java.lang.String…) - the columns to apply the aggregation to in the form Output=Input, if the Output and Input have the same name, then the column name can be specified.

Returns

(com.illumon.iris.db.v2.by.ComboAggregateFactory.ComboBy) a ComboBy object suitable for passing to ComboAggregateFactory.AggCombo(ComboBy…)

AggSum(*matchPairs)

Create a summation aggregation, equivalent to Table.sumBy(String…).

Parameters

matchPairs – (java.lang.String…) - the columns to apply the aggregation to in the form Output=Input, if the Output and Input have the same name, then the column name can be specified.

Returns

(com.illumon.iris.db.v2.by.ComboAggregateFactory.ComboBy) a ComboBy object suitable for passing to ComboAggregateFactory.AggCombo(ComboBy…)

AggVar(*matchPairs)

Create a variance aggregation, equivalent to Table.varBy(String…).

Parameters

matchPairs – (java.lang.String…) - the columns to apply the aggregation to in the form Output=Input, if the Output and Input have the same name, then the column name can be specified.

Returns

(com.illumon.iris.db.v2.by.ComboAggregateFactory.ComboBy) a ComboBy object suitable for passing to ComboAggregateFactory.AggCombo(ComboBy…)

AggWAvg(weight, *matchPairs)

Create a weighted average aggregation, equivalent to Table.wavgBy(String, String…).

Parameters
  • weight – (java.lang.String) - the name of the column to use as the weight for the average

  • matchPairs – (java.lang.String…) - the columns to apply the aggregation to in the form Output=Input, if the Output and Input have the same name, then the column name can be specified.

Returns

(com.illumon.iris.db.v2.by.ComboAggregateFactory.ComboBy) a ComboBy object suitable for passing to ComboAggregateFactory.AggCombo(ComboBy…)

AggWSum(weight, *matchPairs)

Create a weighted sum aggregation, equivalent to Table.wsumBy(String, String…).

Parameters
  • weight – (java.lang.String) - the name of the column to use as the weight for the sum

  • matchPairs – (java.lang.String…) - the columns to apply the aggregation to in the form Output=Input, if the Output and Input have the same name, then the column name can be specified.

Returns

(com.illumon.iris.db.v2.by.ComboAggregateFactory.ComboBy) a ComboBy object suitable for passing to ComboAggregateFactory.AggCombo(ComboBy…)