final String fnName = function.getName();
if (fnName.equalsIgnoreCase("SUM")) {
// there must be only one parameter, if not SQL parser will raise an
// exception
final ValueExpression expr = expressions.get(0);
createSum(expr, function.isDistinct());
} else if (fnName.equalsIgnoreCase("COUNT"))
createCount(expressions, function.isDistinct());
else if (fnName.equalsIgnoreCase("EXTRACT_YEAR")) {
if (numParams != 1)
throw new RuntimeException("EXTRACT_YEAR function has exactly one parameter!");
final ValueExpression expr = expressions.get(0);
final ValueExpression ve = new IntegerYearFromDate(expr);
_exprStack.push(ve);
}
}