|
The JPQL: SELECT SUM(DISTINCT df.fileSize) from Datafile df is, I believe, valid but is rejected with: org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected token: DISTINCT near line 1, column 14 [SELECT SUM ( DISTINCT df.fileSize ) FROM org.icatproject.core.entity.Datafile df] I see that the documentation only states that COUNT(DISTINCT .. will work. However all the aggregate functions should accept the DISTINCT keyword.
Please note that I have also reported this as https://hibernate.atlassian.net/browse/HQLPARSER-67 being unsure where best to report it
|