From d79b9ace8926a959ec76c9c8e418a34a5706cbe7 Mon Sep 17 00:00:00 2001 From: Christian Beikov Date: Thu, 9 Nov 2023 18:38:50 +0100 Subject: [PATCH] Fix Cockroach test failures --- .../dialect/function/array/CockroachArrayFillFunction.java | 2 +- .../org/hibernate/orm/test/function/array/ArrayTrimTest.java | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/function/array/CockroachArrayFillFunction.java b/hibernate-core/src/main/java/org/hibernate/dialect/function/array/CockroachArrayFillFunction.java index 405c893ced..e126670df1 100644 --- a/hibernate-core/src/main/java/org/hibernate/dialect/function/array/CockroachArrayFillFunction.java +++ b/hibernate-core/src/main/java/org/hibernate/dialect/function/array/CockroachArrayFillFunction.java @@ -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) { diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/function/array/ArrayTrimTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/function/array/ArrayTrimTest.java index 514dcf40ee..ae98161af8 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/function/array/ArrayTrimTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/function/array/ArrayTrimTest.java @@ -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 {