accept(Token.RPAREN);
if (lexer.token() == Token.OVER) {
lexer.nextToken();
PGAnalytic over = new PGAnalytic();
accept(Token.LPAREN);
if (identifierEquals("PARTITION")) {
lexer.nextToken();
accept(Token.BY);
if (lexer.token() == (Token.LPAREN)) {
lexer.nextToken();
exprList(over.getPartitionBy());
accept(Token.RPAREN);
} else {
exprList(over.getPartitionBy());
}
}
over.setOrderBy(parseOrderBy());
if (over.getOrderBy() != null) {
//TODO window
}
accept(Token.RPAREN);
aggregateExpr.setOver(over);