Skip to content

Commit 9eae5e6

Browse files
committed
HHH-19365 GaussDB Dialect Support-fix some tests fail
1 parent f56ebab commit 9eae5e6

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

hibernate-core/src/test/java/org/hibernate/orm/test/query/hql/FunctionTests.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1787,8 +1787,6 @@ public void testDurationArithmeticOverflowing(SessionFactoryScope scope) {
17871787
}
17881788

17891789
@Test
1790-
@SkipForDialect(dialectClass = GaussDBDialect.class,
1791-
reason = "GaussDB driver does not support implicit type casting to Long or Duration.")
17921790
public void testDurationArithmeticWithLiterals(SessionFactoryScope scope) {
17931791
scope.inTransaction(
17941792
session -> {
@@ -1891,8 +1889,6 @@ public void testDurationSubtractionWithTimeLiterals(SessionFactoryScope scope) {
18911889
@SkipForDialect(dialectClass = SybaseDialect.class,
18921890
matchSubTypes = true,
18931891
reason = "numeric overflow")
1894-
@SkipForDialect(dialectClass = GaussDBDialect.class,
1895-
reason = "numeric overflow")
18961892
public void testDurationSubtractionWithDatetimeLiterals(SessionFactoryScope scope) {
18971893
scope.inTransaction(
18981894
session -> {
@@ -1973,8 +1969,6 @@ public void testDurationArithmeticWithParameters(SessionFactoryScope scope) {
19731969
}
19741970

19751971
@Test
1976-
@SkipForDialect( dialectClass = GaussDBDialect.class,
1977-
reason = "GaussDB driver does not support implicit type casting to Long or Duration.")
19781972
public void testIntervalDiffExpressions(SessionFactoryScope scope) {
19791973
scope.inTransaction(
19801974
session -> {

hibernate-core/src/test/java/org/hibernate/orm/test/typeoverride/TypeOverrideTest.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import java.sql.Types;
88

99
import org.hibernate.boot.MetadataBuilder;
10+
import org.hibernate.community.dialect.GaussDBDialect;
1011
import org.hibernate.dialect.CockroachDialect;
1112
import org.hibernate.dialect.Dialect;
1213
import org.hibernate.dialect.HANADialect;
@@ -63,6 +64,12 @@ else if ( PostgreSQLDialect.class.isInstance( dialect ) ) {
6364
jdbcTypeRegistry.getDescriptor( Types.BLOB )
6465
);
6566
}
67+
else if ( GaussDBDialect.class.isInstance( dialect ) ) {
68+
assertSame(
69+
BlobJdbcType.BLOB_BINDING,
70+
jdbcTypeRegistry.getDescriptor( Types.BLOB )
71+
);
72+
}
6673
else if ( SybaseDialect.class.isInstance( dialect ) ) {
6774
assertSame(
6875
BlobJdbcType.PRIMITIVE_ARRAY_BINDING,

0 commit comments

Comments
 (0)