use of com.facebook.presto.operator.aggregation.AggregationMetadata.ParameterMetadata.ParameterType in project presto by prestodb.
the class ParametricAggregation method buildParameterMetadata.
private static List<ParameterMetadata> buildParameterMetadata(List<ParameterType> parameterMetadataTypes, List<Type> inputTypes) {
ImmutableList.Builder<ParameterMetadata> builder = ImmutableList.builder();
int inputId = 0;
for (ParameterType parameterMetadataType : parameterMetadataTypes) {
switch(parameterMetadataType) {
case STATE:
case BLOCK_INDEX:
builder.add(new ParameterMetadata(parameterMetadataType));
break;
case INPUT_CHANNEL:
case BLOCK_INPUT_CHANNEL:
case NULLABLE_BLOCK_INPUT_CHANNEL:
builder.add(new ParameterMetadata(parameterMetadataType, inputTypes.get(inputId++)));
break;
}
}
return builder.build();
}
Aggregations