use of com.facebook.presto.spi.statistics.ColumnStatisticMetadata in project presto by prestodb.
the class TestStatisticsWriterNode method createTestDescriptor.
private static StatisticAggregationsDescriptor<VariableReferenceExpression> createTestDescriptor() {
StatisticAggregationsDescriptor.Builder<VariableReferenceExpression> builder = StatisticAggregationsDescriptor.builder();
PlanVariableAllocator variableAllocator = new PlanVariableAllocator();
for (String column : COLUMNS) {
for (ColumnStatisticType type : ColumnStatisticType.values()) {
builder.addColumnStatistic(new ColumnStatisticMetadata(column, type), testVariable(variableAllocator));
}
builder.addGrouping(column, testVariable(variableAllocator));
}
builder.addTableStatistic(ROW_COUNT, testVariable(variableAllocator));
return builder.build();
}
Aggregations