Skip to content

Commit 9ade9b3

Browse files
authored
Merge pull request hibernate#10 from liubao68/work
[HHH-19365]log10 functions
2 parents 227de7f + f283e99 commit 9ade9b3

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

hibernate-core/src/main/java/org/hibernate/dialect/GaussDBDialect.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -523,6 +523,7 @@ public void initializeFunctionRegistry(FunctionContributions functionContributio
523523
functionFactory.moreHyperbolic();
524524
functionFactory.cbrt();
525525
functionFactory.pi();
526+
functionFactory.log10_log();
526527
functionFactory.trim2();
527528
functionFactory.repeat();
528529
functionFactory.initcap();

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

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,6 @@ public void testImplicitCollectionJoinInSelect(SessionFactoryScope scope) {
211211
}
212212

213213
@Test
214-
@SkipForDialect( dialectClass = GaussDBDialect.class, reason = "maybe concurrency")
215214
public void testImplicitCollectionJoinInWhere(SessionFactoryScope scope) {
216215
scope.inTransaction(
217216
session -> {
@@ -391,7 +390,6 @@ public void testAggregateIndexElementKeyValueWithAlias(SessionFactoryScope scope
391390
}
392391

393392
@Test
394-
@SkipForDialect( dialectClass = GaussDBDialect.class, reason = "maybe concurrency")
395393
public void testMaxindexMaxelement(SessionFactoryScope scope) {
396394
scope.inTransaction(
397395
session -> {
@@ -511,7 +509,6 @@ public void testTrigFunctions(SessionFactoryScope scope) {
511509
}
512510

513511
@Test
514-
@SkipForDialect( dialectClass = GaussDBDialect.class, reason = "type:resolved.Unsupported function")
515512
public void testMathFunctions(SessionFactoryScope scope) {
516513
scope.inTransaction(
517514
session -> {
@@ -737,7 +734,6 @@ public void testLocateFunction(SessionFactoryScope scope) {
737734
}
738735

739736
@Test
740-
@SkipForDialect( dialectClass = GaussDBDialect.class, reason = "maybe concurrency")
741737
public void testOverlayFunction(SessionFactoryScope scope) {
742738
scope.inTransaction(
743739
session -> {
@@ -1174,7 +1170,7 @@ public void testCastFunctionWithLength(SessionFactoryScope scope) {
11741170
@SkipForDialect(dialectClass = DB2Dialect.class, majorVersion = 10, minorVersion = 5, reason = "On this version the length of the cast to the parameter appears to be > 2")
11751171
@SkipForDialect( dialectClass = AltibaseDialect.class, reason = "Altibase cast to raw does not do truncatation")
11761172
@SkipForDialect(dialectClass = HSQLDialect.class, reason = "HSQL interprets string as hex literal and produces error")
1177-
@SkipForDialect(dialectClass = GaussDBDialect.class, reason = "type:resolved.Gaussdb bytea doesn't have a length")
1173+
@SkipForDialect(dialectClass = GaussDBDialect.class, reason = "Gaussdb bytea doesn't have a length")
11781174
public void testCastBinaryWithLength(SessionFactoryScope scope) {
11791175
scope.inTransaction(
11801176
session -> {
@@ -1682,7 +1678,6 @@ public void testDurationBy(SessionFactoryScope scope) {
16821678
}
16831679

16841680
@Test
1685-
@SkipForDialect( dialectClass = GaussDBDialect.class, reason = "maybe concurrency")
16861681
public void testDurationLiterals(SessionFactoryScope scope) {
16871682
scope.inTransaction(
16881683
session -> {
@@ -1792,7 +1787,8 @@ public void testDurationArithmeticOverflowing(SessionFactoryScope scope) {
17921787
}
17931788

17941789
@Test
1795-
@SkipForDialect(dialectClass = GaussDBDialect.class, reason = "type:resolved.interval_mul result month: 0.000000, day: 432000000000000.000000 overflow")
1790+
@SkipForDialect(dialectClass = GaussDBDialect.class,
1791+
reason = "GaussDB driver does not support implicit type casting to Long or Duration.")
17961792
public void testDurationArithmeticWithLiterals(SessionFactoryScope scope) {
17971793
scope.inTransaction(
17981794
session -> {
@@ -1895,7 +1891,8 @@ public void testDurationSubtractionWithTimeLiterals(SessionFactoryScope scope) {
18951891
@SkipForDialect(dialectClass = SybaseDialect.class,
18961892
matchSubTypes = true,
18971893
reason = "numeric overflow")
1898-
@SkipForDialect(dialectClass = GaussDBDialect.class, reason = "type:resolved.interval_mul result month: 0.000000, day: 432000000000000.000000 overflow")
1894+
@SkipForDialect(dialectClass = GaussDBDialect.class,
1895+
reason = "numeric overflow")
18991896
public void testDurationSubtractionWithDatetimeLiterals(SessionFactoryScope scope) {
19001897
scope.inTransaction(
19011898
session -> {
@@ -1976,7 +1973,8 @@ public void testDurationArithmeticWithParameters(SessionFactoryScope scope) {
19761973
}
19771974

19781975
@Test
1979-
@SkipForDialect( dialectClass = GaussDBDialect.class, reason = "type:resolving.Bad value for type long")
1976+
@SkipForDialect( dialectClass = GaussDBDialect.class,
1977+
reason = "GaussDB driver does not support implicit type casting to Long or Duration.")
19801978
public void testIntervalDiffExpressions(SessionFactoryScope scope) {
19811979
scope.inTransaction(
19821980
session -> {
@@ -2417,7 +2415,6 @@ public void testIn(SessionFactoryScope scope) {
24172415
}
24182416

24192417
@Test
2420-
@SkipForDialect( dialectClass = GaussDBDialect.class, reason = "maybe concurrency")
24212418
public void testMaxGreatest(SessionFactoryScope scope) {
24222419
scope.inTransaction(
24232420
session -> {

0 commit comments

Comments
 (0)