Skip to content

Commit ff4a01b

Browse files
authored
Merge pull request hibernate#11 from liubao68/work
[HHH-19365]json functions
2 parents 9ade9b3 + 62a9c52 commit ff4a01b

File tree

6 files changed

+0
-178
lines changed

6 files changed

+0
-178
lines changed

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,6 @@ public void initializeFunctionRegistry(FunctionContributions functionContributio
572572
functionFactory.arrayFill_gaussdb();
573573

574574
functionFactory.jsonObject_gaussdb();
575-
functionFactory.jsonObjectAgg_gaussdb( true );
576575

577576
functionFactory.makeDateTimeTimestamp();
578577
// Note that GaussDB doesn't support the OVER clause for ordered set-aggregate functions

hibernate-core/src/main/java/org/hibernate/dialect/function/CommonFunctionFactory.java

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3559,13 +3559,6 @@ public void jsonExists() {
35593559
functionRegistry.register( "json_exists", new JsonExistsFunction( typeConfiguration, true, true ) );
35603560
}
35613561

3562-
/**
3563-
* json_exists() function
3564-
*/
3565-
public void jsonExists_gaussdb() {
3566-
functionRegistry.register( "json_exists", new GaussDBJsonExistsFunction( typeConfiguration, false, false ) );
3567-
}
3568-
35693562
/**
35703563
* json_exists() function that doesn't support the passing clause
35713564
*/
@@ -3846,13 +3839,6 @@ public void jsonObjectAgg_postgresql(boolean supportsStandard) {
38463839
functionRegistry.register( "json_objectagg", new PostgreSQLJsonObjectAggFunction( supportsStandard, typeConfiguration ) );
38473840
}
38483841

3849-
/**
3850-
* GaussDB json_objectagg() function
3851-
*/
3852-
public void jsonObjectAgg_gaussdb(boolean supportsStandard) {
3853-
functionRegistry.register( "json_objectagg", new GaussDBJsonObjectAggFunction( supportsStandard, typeConfiguration ) );
3854-
}
3855-
38563842
/**
38573843
* MySQL json_objectagg() function
38583844
*/
@@ -4081,13 +4067,6 @@ public void jsonMergepatch_postgresql() {
40814067
functionRegistry.register( "json_mergepatch", new PostgreSQLJsonMergepatchFunction( typeConfiguration ) );
40824068
}
40834069

4084-
/**
4085-
* GaussDB json_mergepatch() function
4086-
*/
4087-
public void jsonMergepatch_gaussdb() {
4088-
functionRegistry.register( "json_mergepatch", new GaussDBJsonMergepatchFunction( typeConfiguration ) );
4089-
}
4090-
40914070
/**
40924071
* MySQL json_mergepatch() function
40934072
*/
@@ -4118,13 +4097,6 @@ public void jsonArrayAppend_postgresql(boolean supportsLax) {
41184097
functionRegistry.register( "json_array_append", new PostgreSQLJsonArrayAppendFunction( supportsLax, typeConfiguration ) );
41194098
}
41204099

4121-
/**
4122-
* GaussDB json_array_append() function
4123-
*/
4124-
public void jsonArrayAppend_gaussdb(boolean supportsLax) {
4125-
functionRegistry.register( "json_array_append", new GaussDBJsonArrayAppendFunction( supportsLax, typeConfiguration ) );
4126-
}
4127-
41284100
/**
41294101
* MySQL json_array_append() function
41304102
*/

hibernate-core/src/main/java/org/hibernate/dialect/function/json/GaussDBJsonArrayAppendFunction.java

Lines changed: 0 additions & 47 deletions
This file was deleted.

hibernate-core/src/main/java/org/hibernate/dialect/function/json/GaussDBJsonMergepatchFunction.java

Lines changed: 0 additions & 44 deletions
This file was deleted.

hibernate-core/src/main/java/org/hibernate/dialect/function/json/GaussDBJsonObjectAggFunction.java

Lines changed: 0 additions & 51 deletions
This file was deleted.

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

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
import org.hibernate.cfg.QuerySettings;
1919
import org.hibernate.dialect.CockroachDialect;
2020
import org.hibernate.dialect.DB2Dialect;
21-
import org.hibernate.dialect.GaussDBDialect;
2221
import org.hibernate.dialect.HANADialect;
2322
import org.hibernate.dialect.HSQLDialect;
2423
import org.hibernate.dialect.MySQLDialect;
@@ -72,7 +71,6 @@
7271
@ServiceRegistry(settings = @Setting(name = QuerySettings.JSON_FUNCTIONS_ENABLED, value = "true"))
7372
@SessionFactory
7473
@Jira("https://hibernate.atlassian.net/browse/HHH-18496")
75-
@SkipForDialect(dialectClass = GaussDBDialect.class, reason = "opengauss don't support")
7674
public class JsonFunctionTests {
7775

7876
JsonHolder entity;
@@ -219,7 +217,6 @@ public void testJsonQuery(SessionFactoryScope scope) {
219217

220218
@Test
221219
@RequiresDialectFeature(feature = DialectFeatureChecks.SupportsJsonQueryNestedPath.class)
222-
@SkipForDialect(dialectClass = GaussDBDialect.class, reason = "type:resolved.Not support $.theNestedObjects[*].id")
223220
public void testJsonQueryNested(SessionFactoryScope scope) {
224221
scope.inTransaction(
225222
session -> {
@@ -421,7 +418,6 @@ public void testJsonObjectAgg(SessionFactoryScope scope) {
421418

422419
@Test
423420
@RequiresDialectFeature(feature = DialectFeatureChecks.SupportsJsonObjectAgg.class)
424-
@SkipForDialect(dialectClass = GaussDBDialect.class, reason = "type:resolved.Gauss has different behavior")
425421
public void testJsonObjectAggNullFilter(SessionFactoryScope scope) {
426422
scope.inTransaction(
427423
session -> {
@@ -464,7 +460,6 @@ public void testJsonObjectAggNullClause(SessionFactoryScope scope) {
464460
@SkipForDialect(dialectClass = DB2Dialect.class, reason = "DB2 has no way to throw an error on duplicate json object keys.")
465461
@SkipForDialect(dialectClass = CockroachDialect.class, reason = "CockroachDB has no way to throw an error on duplicate json object keys.")
466462
@SkipForDialect(dialectClass = PostgreSQLDialect.class, majorVersion = 15, matchSubTypes = true, reason = "CockroachDB has no way to throw an error on duplicate json object keys.")
467-
@SkipForDialect(dialectClass = GaussDBDialect.class, reason = "type:resolved.not supported")
468463
public void testJsonObjectAggUniqueKeys(SessionFactoryScope scope) {
469464
scope.inTransaction(
470465
session -> {
@@ -626,7 +621,6 @@ public void testJsonInsertWithExisting(SessionFactoryScope scope) {
626621

627622
@Test
628623
@RequiresDialectFeature(feature = DialectFeatureChecks.SupportsJsonMergepatch.class)
629-
@SkipForDialect(dialectClass = GaussDBDialect.class, reason = "type:resolved.gauss has different function definition")
630624
public void testJsonMergepatch(SessionFactoryScope scope) {
631625
scope.inTransaction(
632626
session -> {
@@ -644,7 +638,6 @@ public void testJsonMergepatch(SessionFactoryScope scope) {
644638

645639
@Test
646640
@RequiresDialectFeature(feature = DialectFeatureChecks.SupportsJsonMergepatch.class)
647-
@SkipForDialect(dialectClass = GaussDBDialect.class, reason = "type:resolved.gauss has different behavior")
648641
public void testJsonMergepatchVarargs(SessionFactoryScope scope) {
649642
scope.inTransaction(
650643
session -> {

0 commit comments

Comments
 (0)