}
List<UIAggregate> algorithmAggs = new ArrayList<UIAggregate>();
for (Aggregate agg : result.getAggregates()) {
UIAggregateImpl cagg = new UIAggregateImpl();
cagg.setName(agg.getCandidateTableName());
cagg.setAlgoAgg(true);
cagg.setDescription(agg.getDescription());
cagg.setEstimateRowCount(agg.estimateRowCount());
cagg.setEstimateSpace(agg.estimateSpace());
List<Attribute> list = new ArrayList<Attribute>(agg.getAttributes());
cagg.setAttributes(list);
List<Measure> measureList = new ArrayList<Measure>(agg.getMeasures());
cagg.setMeasures(measureList);
algorithmAggs.add(cagg);
}
// reverse the collection, the results from the algorithm seem to