Class<?> inputType = symbol.getType();
if(symbol instanceof AggregateSymbol) {
AggregateSymbol aggSymbol = (AggregateSymbol) symbol;
if(aggSymbol.getExpression() == null) {
functions[i] = new Count();
} else {
Expression ex = aggSymbol.getExpression();
inputType = ex.getType();
int index = collectExpression(ex);
Type function = aggSymbol.getAggregateFunction();
switch (function) {
case COUNT:
functions[i] = new Count();
break;
case SUM:
functions[i] = new Sum();
break;
case AVG: