The patch provided contains changes to QL interfaces that break the original design idea. In addition CastorQL and EJBQL parsers seam to have some other major bugs that need to be resolved first. To find out all of them we have to add tests for all required features and as the syntax of both parsers is different we should review them independent of the other. Therefore the attached patch have to be splitted up into 3 pieces. The new patches should be attached to the different subtask to CASTOR-3115 I created.
THe most critical point here is the change in class design. The QO interfaces are intended to be used by users of Castor. All supported syntax elements have to be supported through these interfaces and users should not use or be aware of the implementations behind these interfaces. Therefore the following change in the patch is a no go:
- select.addProjection(schema.field("bar"));
+ select.addProjection(new ProjectionImpl(schema.field("bar")));
On the other hand it is a good idea to introduce a new aggregate package, AbstractAggregate and Count class. I also appreciate the tests added.
Before investing more time in the implementation of QO I like to see suggestions how a user should work with aggrgation functions with QO interfaces only.
projects=projections