Skip to content

Commit 4a07b5e

Browse files
committed
HHH-18798 Add JSON aggregate support for SQL Server
1 parent d973dcc commit 4a07b5e

File tree

5 files changed

+432
-20
lines changed

5 files changed

+432
-20
lines changed

hibernate-community-dialects/src/main/java/org/hibernate/community/dialect/SQLServerLegacyDialect.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
import org.hibernate.dialect.SQLServerCastingXmlArrayJdbcTypeConstructor;
2020
import org.hibernate.dialect.SQLServerCastingXmlJdbcType;
2121
import org.hibernate.dialect.TimeZoneSupport;
22+
import org.hibernate.dialect.aggregate.AggregateSupport;
23+
import org.hibernate.dialect.aggregate.SQLServerAggregateSupport;
2224
import org.hibernate.dialect.function.CommonFunctionFactory;
2325
import org.hibernate.dialect.function.CountFunction;
2426
import org.hibernate.dialect.function.SQLServerFormatEmulation;
@@ -504,6 +506,11 @@ protected <T extends JdbcOperation> SqlAstTranslator<T> buildTranslator(
504506
};
505507
}
506508

509+
@Override
510+
public AggregateSupport getAggregateSupport() {
511+
return SQLServerAggregateSupport.valueOf( this );
512+
}
513+
507514
@Override
508515
public SizeStrategy getSizeStrategy() {
509516
return sizeStrategy;

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
import org.hibernate.boot.model.relational.QualifiedSequenceName;
2626
import org.hibernate.boot.model.relational.Sequence;
2727
import org.hibernate.boot.model.relational.SqlStringGenerationContext;
28+
import org.hibernate.dialect.aggregate.AggregateSupport;
29+
import org.hibernate.dialect.aggregate.SQLServerAggregateSupport;
2830
import org.hibernate.dialect.function.CommonFunctionFactory;
2931
import org.hibernate.dialect.function.CountFunction;
3032
import org.hibernate.dialect.function.SQLServerFormatEmulation;
@@ -511,6 +513,11 @@ protected <T extends JdbcOperation> SqlAstTranslator<T> buildTranslator(
511513
};
512514
}
513515

516+
@Override
517+
public AggregateSupport getAggregateSupport() {
518+
return SQLServerAggregateSupport.valueOf( this );
519+
}
520+
514521
@Override
515522
public SizeStrategy getSizeStrategy() {
516523
return sizeStrategy;

0 commit comments

Comments
 (0)