MetadataManager metadata = new MetadataManager();
Expression parsedExpression = FunctionAssertions.createExpression(expression, metadata, SYMBOL_TYPES);
IdentityHashMap<Expression, Type> expressionTypes = getExpressionTypes(SESSION, metadata, SYMBOL_TYPES, parsedExpression);
ExpressionInterpreter interpreter = expressionOptimizer(parsedExpression, metadata, SESSION, expressionTypes);
return interpreter.optimize(new SymbolResolver()
{
@Override
public Object getValue(Symbol symbol)
{
switch (symbol.getName().toLowerCase()) {