} else if (function == AggregationFunction.Count) {
calc = new CountVisitor();
} else if (function == AggregationFunction.Max) {
calc = new MaxVisitor(attIndex, features.getSchema());
} else if (function == AggregationFunction.Median) {
calc = new MedianVisitor(attIndex, features.getSchema());
} else if (function == AggregationFunction.Min) {
calc = new MinVisitor(attIndex, features.getSchema());
} else if (function == AggregationFunction.StdDev) {
calc = new StandardDeviationVisitor(CommonFactoryFinder.getFilterFactory(null).property(aggAttribute));
} else if (function == AggregationFunction.Sum) {