String query = "select count(1) from atable group by a_string having count(1) >= 1 or a_string = 'foo'";
List<Object> binds = Collections.emptyList();
Expressions expressions = compileStatement(query,binds);
PColumn aCol = ATABLE.getColumn("A_STRING");
Expression h = or(
constantComparison(CompareOp.GREATER_OR_EQUAL, new CountAggregateFunction(),1L),
constantComparison(CompareOp.EQUAL,
new RowKeyColumnExpression(aCol, // a_string comes from group by key in this case
new RowKeyValueAccessor(Arrays.<PColumn>asList(aCol), 0)),"foo"));
assertNull(expressions.whereClause);
assertEquals(h, expressions.havingClause);