Package org.apache.druid.segment.column
Class RowSignature.Builder
java.lang.Object
org.apache.druid.segment.column.RowSignature.Builder
- Enclosing class:
- RowSignature
-
Method Summary
Modifier and TypeMethodDescriptionadd(String columnName, ColumnType columnType) Add a column to this signature.addAggregators(List<AggregatorFactory> aggregators, RowSignature.Finalization finalization) Adds aggregations to a signature.addAll(RowSignature other) addDimensions(List<DimensionSpec> dimensions) addPostAggregators(List<PostAggregator> postAggregators) Adds post-aggregators to a signature.build()
-
Method Details
-
add
Add a column to this signature.- Parameters:
columnName- name, must be nonnullcolumnType- type, may be null if unknown
-
addAll
-
addTimeColumn
-
addDimensions
-
addAggregators
public RowSignature.Builder addAggregators(List<AggregatorFactory> aggregators, RowSignature.Finalization finalization) Adds aggregations to a signature.RowSignature.Finalization.YESwill add finalized types andRowSignature.Finalization.NOwill add intermediate types.RowSignature.Finalization.UNKNOWNwill 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
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
-