HSQLDialect returns supportsTupleDistinctCounts false which seems wrong

Description

According to http://hsqldb.org/doc/guide/dataaccess-chapt.html#dac_aggregate_funcs such queries are valid:
SELECT COUNT(DISTINCT firstname, lastname) FROM customer
SELECT COUNT(DISTINCT (firstname, lastname)) FROM customer

Because of that org.hibernate.test.cid.CompositeIdTest.testDistinctCountOfEntityWithCompositeId()
fails with a

java.lang.AssertionError: expected SQLGrammarException
at org.junit.Assert.fail(Assert.java:88)
at org.hibernate.test.cid.CompositeIdTest.testDistinctCountOfEntityWithCompositeId(CompositeIdTest.java:101)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.hibernate.testing.junit4.ExtendedFrameworkMethod.invokeExplosively(ExtendedFrameworkMethod.java:45)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.internal.runners.statements.FailOnTimeout$StatementThread.run(FailOnTimeout.java:74)

as soon as you try to run the tests using hsqldb instead of h2.
So it looks like the hsqldb dialect is wrong for latest versions of hsqldb.

Environment

None

Activity

Show:
Andrea Boriero
November 26, 2015, 5:21 PM

it seems the support was introduced with version 2.2.9
http://hsqldb.org/doc/2.0/changelist_2_0.txt

Assignee

Andrea Boriero

Reporter

Carsten Hammer

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Minor
Configure