Fix Cockroach test failures
This commit is contained in:
parent
b67a0bad32
commit
d79b9ace89
|
@ -53,7 +53,7 @@ public class CockroachArrayFillFunction extends AbstractArrayFillFunction {
|
||||||
}
|
}
|
||||||
sqlAppender.append( ") from generate_series(1," );
|
sqlAppender.append( ") from generate_series(1," );
|
||||||
sqlAstArguments.get( 1 ).accept( walker );
|
sqlAstArguments.get( 1 ).accept( walker );
|
||||||
sqlAppender.append( ",1))) end,array[])" );
|
sqlAppender.append( ",1)) end,array[])" );
|
||||||
}
|
}
|
||||||
|
|
||||||
private static boolean needsElementCasting(Expression elementExpression) {
|
private static boolean needsElementCasting(Expression elementExpression) {
|
||||||
|
|
|
@ -11,6 +11,7 @@ import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.hibernate.cfg.AvailableSettings;
|
import org.hibernate.cfg.AvailableSettings;
|
||||||
|
import org.hibernate.dialect.CockroachDialect;
|
||||||
import org.hibernate.dialect.PostgreSQLDialect;
|
import org.hibernate.dialect.PostgreSQLDialect;
|
||||||
import org.hibernate.query.criteria.JpaCriteriaQuery;
|
import org.hibernate.query.criteria.JpaCriteriaQuery;
|
||||||
import org.hibernate.query.criteria.JpaRoot;
|
import org.hibernate.query.criteria.JpaRoot;
|
||||||
|
@ -90,6 +91,7 @@ public class ArrayTrimTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@SkipForDialect(dialectClass = PostgreSQLDialect.class, majorVersion = 12, reason = "The PostgreSQL emulation for version < 14 doesn't throw an error")
|
@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) {
|
public void testTrimOutOfRange(SessionFactoryScope scope) {
|
||||||
scope.inSession( em -> {
|
scope.inSession( em -> {
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in New Issue