DISTINCT does not work with aggregate functions in JPQL

Description

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.

Environment

This is the hibernate used by Wildfly 10.0.0.0.CR2

Assignee

Unassigned

Reporter

Steve Fisher

Labels

None

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Suitable for new contributors

None

Pull Request

None

backportDecision

None

backportReEvaluate

None

Priority

Major
Configure