Package com.illumon.iris.db.v2.by
Class ApproximatePercentile.PercentileDefinition
java.lang.Object
com.illumon.iris.db.v2.by.ApproximatePercentile.PercentileDefinition
- Enclosing class:
- ApproximatePercentile
A builder class for an approximate percentile definition to be used with
ApproximatePercentile.approximatePercentiles(com.illumon.iris.db.tables.Table, com.illumon.iris.db.v2.by.ApproximatePercentile.PercentileDefinition, com.illumon.iris.db.v2.select.SelectColumn...)
.-
Constructor Summary
ConstructorsConstructorDescriptionPercentileDefinition
(String inputColumn) Create a builder with the current input column set to inputColumn. -
Method Summary
Modifier and TypeMethodDescriptionAdds an output column.Adds an output column with the count of observed values.Adds an output column with the maximum observed value.Adds an output column with the minimum observed value.exposeDigest
(String digestColumnName) If true, the tDigest column is exposed using the given namenextColumn
(String inputColumn) Sets the name of the inputColumnsetCompression
(double compression) Sets the t-digest compression parameter.
-
Constructor Details
-
PercentileDefinition
Create a builder with the current input column set to inputColumn.- Parameters:
inputColumn
- the current input column
-
-
Method Details
-
add
Adds an output column. To set the inputColumn callnextColumn(String)
.- Parameters:
percentile
- the percentile to calculateresultName
- the result name- Returns:
- a (possibly new) PercentileDefinition
-
addMax
Adds an output column with the maximum observed value.To set the inputColumn call
nextColumn(String)
.- Parameters:
resultName
- the result name- Returns:
- a (possibly new) PercentileDefinition
-
addMin
Adds an output column with the minimum observed value.To set the inputColumn call
nextColumn(String)
.- Parameters:
resultName
- the result name- Returns:
- a (possibly new) PercentileDefinition
-
addCount
Adds an output column with the count of observed values.To set the inputColumn call
nextColumn(String)
.- Parameters:
resultName
- the result name- Returns:
- a (possibly new) PercentileDefinition
-
nextColumn
Sets the name of the inputColumn- Parameters:
inputColumn
- the name of the input column that subsequent calls toadd(double, java.lang.String)
operate on.- Returns:
- a (possibly new) PercentileDefinition
-
setCompression
Sets the t-digest compression parameter.- Parameters:
compression
- the t-digest compression factor.- Returns:
- a (possibly new) PercentileDefinition
-
exposeDigest
If true, the tDigest column is exposed using the given name- Parameters:
digestColumnName
- the name of the t-digest column in the output- Returns:
- a (possibly new) PercentileDefinition
-