Package org.apache.druid.segment.column
Class RowSignature.Builder
- java.lang.Object
-
- org.apache.druid.segment.column.RowSignature.Builder
-
- Enclosing class:
- RowSignature
public static class RowSignature.Builder extends Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RowSignature.Builder
add(String columnName, ColumnType columnType)
Add a column to this signature.RowSignature.Builder
addAggregators(List<AggregatorFactory> aggregators, RowSignature.Finalization finalization)
Adds aggregations to a signature.RowSignature.Builder
addAll(RowSignature other)
RowSignature.Builder
addDimensions(List<DimensionSpec> dimensions)
RowSignature.Builder
addPostAggregators(List<PostAggregator> postAggregators)
Adds post-aggregators to a signature.RowSignature.Builder
addTimeColumn()
RowSignature
build()
-
-
-
Method Detail
-
add
public RowSignature.Builder add(String columnName, @Nullable ColumnType columnType)
Add a column to this signature.- Parameters:
columnName
- name, must be nonnullcolumnType
- type, may be null if unknown
-
addAll
public RowSignature.Builder addAll(RowSignature other)
-
addTimeColumn
public RowSignature.Builder addTimeColumn()
-
addDimensions
public RowSignature.Builder addDimensions(List<DimensionSpec> dimensions)
-
addAggregators
public RowSignature.Builder addAggregators(List<AggregatorFactory> aggregators, RowSignature.Finalization finalization)
Adds aggregations to a signature.RowSignature.Finalization.YES
will add finalized types andRowSignature.Finalization.NO
will add intermediate types.RowSignature.Finalization.UNKNOWN
will add the intermediate / finalized type when they are the same. Otherwise, it will add a null type.- Parameters:
aggregators
- list of aggregation functionsfinalization
- whether the aggregator results will be finalized
-
addPostAggregators
public RowSignature.Builder addPostAggregators(List<PostAggregator> postAggregators)
Adds post-aggregators to a signature. Note: to ensure types are computed properly, post-aggregators must be added *after* any columns that they depend on, and they must be added in the order that the query engine will compute them. This method assumes that post-aggregators are computed in order, and that they can refer to earlier post-aggregators but not to later ones.
-
build
public RowSignature build()
-
-