File tree Expand file tree Collapse file tree 1 file changed +14
-6
lines changed
hibernate-core/src/test/java/org/hibernate/orm/test/hql Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -926,12 +926,20 @@ public void testSelectClauseCaseWithCountDistinct() {
926926
927927 s .flush ();
928928
929- Number count = (Number ) s .createQuery ( "select count(distinct case when bodyWeight > 100 then description else null end) from Human" ).uniqueResult ();
930- assertEquals ( 1 , count .intValue () );
931- count = (Number ) s .createQuery ( "select count(case when bodyWeight > 100 then description else null end) from Human" ).uniqueResult ();
932- assertEquals ( 2 , count .intValue () );
933- count = (Number ) s .createQuery ( "select count(distinct case when bodyWeight > 100 then nickName else null end) from Human" ).uniqueResult ();
934- assertEquals ( 2 , count .intValue () );
929+ if ( !( getDialect () instanceof InformixDialect && getDialect ().getVersion ().isBefore ( 11 , 70 ) ) ) {
930+ Number count = (Number ) s .createQuery (
931+ "select count(distinct case when bodyWeight > 100 then description else null end) from Human" )
932+ .uniqueResult ();
933+ assertEquals ( 1 , count .intValue () );
934+ count = (Number ) s .createQuery (
935+ "select count(case when bodyWeight > 100 then description else null end) from Human" )
936+ .uniqueResult ();
937+ assertEquals ( 2 , count .intValue () );
938+ count = (Number ) s .createQuery (
939+ "select count(distinct case when bodyWeight > 100 then nickName else null end) from Human" )
940+ .uniqueResult ();
941+ assertEquals ( 2 , count .intValue () );
942+ }
935943
936944 t .rollback ();
937945 s .close ();
You can’t perform that action at this time.
0 commit comments