Fix Cockroach test failures

This commit is contained in:
Christian Beikov 2023-11-09 18:38:50 +01:00
parent b67a0bad32
commit d79b9ace89
2 changed files with 3 additions and 1 deletions

View File

@ -53,7 +53,7 @@ public class CockroachArrayFillFunction extends AbstractArrayFillFunction {
}
sqlAppender.append( ") from generate_series(1," );
sqlAstArguments.get( 1 ).accept( walker );
sqlAppender.append( ",1))) end,array[])" );
sqlAppender.append( ",1)) end,array[])" );
}
private static boolean needsElementCasting(Expression elementExpression) {

View File

@ -11,6 +11,7 @@ import java.util.Collection;
import java.util.List;
import org.hibernate.cfg.AvailableSettings;
import org.hibernate.dialect.CockroachDialect;
import org.hibernate.dialect.PostgreSQLDialect;
import org.hibernate.query.criteria.JpaCriteriaQuery;
import org.hibernate.query.criteria.JpaRoot;
@ -90,6 +91,7 @@ public class ArrayTrimTest {
@Test
@SkipForDialect(dialectClass = PostgreSQLDialect.class, majorVersion = 12, reason = "The PostgreSQL emulation for version < 14 doesn't throw an error")
@SkipForDialect(dialectClass = CockroachDialect.class, reason = "The Cockroach emulation doesn't throw an error")
public void testTrimOutOfRange(SessionFactoryScope scope) {
scope.inSession( em -> {
try {