for (ParseNode node : postFilters) {
postFiltersRewrite.add(node.accept(this));
}
if (statement.getGroupBy().isEmpty()) {
ParseNode where = statement.getWhere();
if (where != null) {
postFiltersRewrite.add(where);
}
return NODE_FACTORY.select(statement.getFrom(), statement.getHint(), statement.isDistinct(), statement.getSelect(), combine(postFiltersRewrite), statement.getGroupBy(), statement.getHaving(), statement.getOrderBy(), statement.getLimit(),
statement.getBindCount(), statement.isAggregate(), statement.hasSequence());
}
ParseNode having = statement.getHaving();
if (having != null) {
postFiltersRewrite.add(having);
}
return NODE_FACTORY.select(statement.getFrom(), statement.getHint(), statement.isDistinct(), statement.getSelect(), statement.getWhere(), statement.getGroupBy(), combine(postFiltersRewrite), statement.getOrderBy(), statement.getLimit(),
statement.getBindCount(), statement.isAggregate(), statement.hasSequence());