@Override public Object evaluate(ExecutionContext context) throws FunctionDomainException, TypeMismatchException, NameResolutionException, QueryInvocationTargetException { if (this._function == LITERAL_element) { Object arg = _args[0].evaluate(context); return call(arg, context); } else if (this._function == LITERAL_nvl) { return Functions.nvl(_args[0], _args[1], context); } else if (this._function == LITERAL_to_date) { return Functions.to_date(_args[0], _args[1], context); } else { throw new QueryInvalidException( "UnSupported function was used in the query"); } }