diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/query/criteria/CriteriaOrderedSetAggregateTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/query/criteria/CriteriaOrderedSetAggregateTest.java index a6c42a3b9c..58fdd42fd8 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/query/criteria/CriteriaOrderedSetAggregateTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/query/criteria/CriteriaOrderedSetAggregateTest.java @@ -10,11 +10,10 @@ import java.util.Arrays; import java.util.Date; import java.util.List; -import org.hibernate.dialect.DB2Dialect; +import org.hibernate.dialect.CockroachDialect; import org.hibernate.dialect.H2Dialect; import org.hibernate.dialect.PostgreSQLDialect; import org.hibernate.dialect.PostgresPlusDialect; -import org.hibernate.dialect.SQLServerDialect; import org.hibernate.query.criteria.HibernateCriteriaBuilder; import org.hibernate.query.criteria.JpaExpression; import org.hibernate.query.criteria.JpaWindow; @@ -244,9 +243,11 @@ public class CriteriaOrderedSetAggregateTest { @RequiresDialectFeature(feature = DialectFeatureChecks.SupportsInverseDistributionFunctions.class) @RequiresDialectFeature(feature = DialectFeatureChecks.SupportsWindowFunctions.class) @SkipForDialect(dialectClass = PostgreSQLDialect.class) + @SkipForDialect(dialectClass = CockroachDialect.class) @SkipForDialect(dialectClass = PostgresPlusDialect.class) public void testInverseDistributionWithWindow(SessionFactoryScope scope) { - // note : PostgreSQL and EDB currently does not support ordered-set aggregate functions with OVER clause + // note : PostgreSQL, CockroachDB and EDB currently do not support + // ordered-set aggregate functions with OVER clause scope.inTransaction( session -> { HibernateCriteriaBuilder cb = session.getCriteriaBuilder(); CriteriaQuery cr = cb.createQuery( Integer.class ); @@ -306,10 +307,9 @@ public class CriteriaOrderedSetAggregateTest { @Test @RequiresDialectFeature(feature = DialectFeatureChecks.SupportsHypotheticalSetFunctions.class) - @SkipForDialect(dialectClass = SQLServerDialect.class) - @SkipForDialect(dialectClass = DB2Dialect.class) + @RequiresDialect(H2Dialect.class) public void testHypotheticalSetRankWithGroupByHavingOrderByLimit(SessionFactoryScope scope) { - // note : this query is not translated correctly for SQLServer and DB2, skip for now + // note : cross joins are not supported in criteria and this query structure causes problems with many dbs scope.inTransaction( session -> { HibernateCriteriaBuilder cb = session.getCriteriaBuilder(); CriteriaQuery cr = cb.createQuery( Tuple.class );