Package com.illumon.iris.treetable
Class RollupDefinition.Builder
java.lang.Object
com.illumon.iris.treetable.RollupDefinition.Builder
- Enclosing class:
- RollupDefinition
A Builder class to define rollups and attach them to tables as predefined rollups.
Instances may be retained to hold references to pre-created rollups.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSet the columns to include for the specified aggregation.agg(AggType type, Collection<String> columns) Set the columns to include for the specified aggregation.build()Create a RollupDefinition from the state of this builder.buildAndAttach(Table attachTo) Create the rollup definition and attach it to the specified table as a predefined rollup.buildAndAttach(Table attachTo, boolean preCreate) Create the rollup definition and attach it to the specified table as a predefined rollup.groupingColumns(String... columns) Set the grouping columns.groupingColumns(Collection<String> columns) Set the grouping columns.includeConstituents(boolean include) Set if the result table should include constituents.includeOriginalColumns(boolean include) Set if the result table should include original columns.Set the name for the rollup.withDescriptions(boolean includeDescriptions) Set if the rollup should include column descriptions for each column.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
name
Set the name for the rollup.- Parameters:
name- the name- Returns:
- this builder
-
groupingColumns
Set the grouping columns.- Parameters:
columns- the grouping columns- Returns:
- this builder
-
groupingColumns
Set the grouping columns.- Parameters:
columns- the grouping columns- Returns:
- this builder
-
agg
Set the columns to include for the specified aggregation.- Parameters:
type- the aggregationcolumns- the columns to aggregate- Returns:
- this builder
-
agg
Set the columns to include for the specified aggregation.- Parameters:
type- the aggregationcolumns- the columns to aggregate- Returns:
- this builder
-
includeConstituents
Set if the result table should include constituents. NOTE: This is currently unsupported.- Parameters:
include- if constituent rows should be included- Returns:
- this builder
-
includeOriginalColumns
Set if the result table should include original columns. NOTE: This is currently unsupported.- Parameters:
include- if original columns should be included- Returns:
- this builder
-
withDescriptions
Set if the rollup should include column descriptions for each column.- Parameters:
includeDescriptions- true if the rollup should add column descriptions- Returns:
- this builder
-
build
Create a RollupDefinition from the state of this builder.- Returns:
- this a new definition.
- Throws:
UncheckedDeephavenException- if the definition is not complete.
-
buildAndAttach
Create the rollup definition and attach it to the specified table as a predefined rollup.- Parameters:
attachTo- the table to attach to- Returns:
- this builder
- Throws:
UncheckedDeephavenException- if the builder has an error
-
buildAndAttach
public RollupDefinition.Builder buildAndAttach(Table attachTo, boolean preCreate) throws UncheckedDeephavenException Create the rollup definition and attach it to the specified table as a predefined rollup. Additionally, create and hold a reference to the rollup table if requested.- Parameters:
attachTo- the table to attach to- Returns:
- this builder
- Throws:
UncheckedDeephavenException- If the builder has an error
-