// TODO: confirm that this is a valid optimization
String query = "select count(1) from atable group by a_date having round(a_date,'hour') > ?";
Date date = new Date(System.currentTimeMillis());
List<Object> binds = Arrays.<Object>asList(date);
Expressions expressions = compileStatement(query,binds);
Expression w = constantComparison(CompareOp.GREATER, new RoundFunction(Arrays.asList(kvColumn(BaseConnectionlessQueryTest.A_DATE),LiteralExpression.newConstant("hour"),LiteralExpression.newConstant(1))), date);
assertEquals(w, expressions.whereClause);
assertNull(expressions.havingClause);
}