[jboss-jira] [JBoss JIRA] (WFLY-5573) DISTINCT does not work with aggregate functions in JPQL
Steve Fisher (JIRA)
issues at jboss.org
Fri Oct 23 10:50:00 EDT 2015
Steve Fisher created WFLY-5573:
----------------------------------
Summary: DISTINCT does not work with aggregate functions in JPQL
Key: WFLY-5573
URL: https://issues.jboss.org/browse/WFLY-5573
Project: WildFly
Issue Type: Bug
Components: JPA / Hibernate
Affects Versions: 10.0.0.CR2
Reporter: Steve Fisher
Assignee: Scott Marlow
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.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
More information about the jboss-jira
mailing list