HHH-16656 Register ranking window functions for H2 1.4.200

This commit is contained in:
Christian Beikov 2023-05-21 13:27:49 +02:00
parent e12b82033e
commit f49bce8bde
2 changed files with 4 additions and 4 deletions

View File

@ -348,10 +348,10 @@ public class H2Dialect extends Dialect {
functionFactory.rownum();
if ( getVersion().isSameOrAfter( 1, 4, 200 ) ) {
functionFactory.windowFunctions();
if ( getVersion().isSameOrAfter( 2 ) ) {
functionFactory.listagg( null );
functionFactory.inverseDistributionOrderedSetAggregates();
functionFactory.hypotheticalOrderedSetAggregates();
if ( getVersion().isSameOrAfter( 2 ) ) {
functionFactory.listagg( null );
}
else {
// Use group_concat until 2.x as listagg was buggy

View File

@ -412,7 +412,7 @@ abstract public class DialectFeatureChecks {
public static class SupportsInverseDistributionFunctions implements DialectFeatureCheck {
public boolean apply(Dialect dialect) {
dialect = DialectDelegateWrapper.extractRealDialect( dialect );
return dialect instanceof H2Dialect && dialect.getVersion().isSameOrAfter( 2 )
return dialect instanceof H2Dialect && dialect.getVersion().isSameOrAfter( 1, 4, 200 )
|| dialect instanceof PostgreSQLDialect
|| dialect instanceof AbstractHANADialect
|| dialect instanceof CockroachDialect
@ -426,7 +426,7 @@ abstract public class DialectFeatureChecks {
public static class SupportsHypotheticalSetFunctions implements DialectFeatureCheck {
public boolean apply(Dialect dialect) {
dialect = DialectDelegateWrapper.extractRealDialect( dialect );
return dialect instanceof H2Dialect && dialect.getVersion().isSameOrAfter( 2 )
return dialect instanceof H2Dialect && dialect.getVersion().isSameOrAfter( 1, 4, 200 )
|| dialect instanceof PostgreSQLDialect
|| dialect instanceof AbstractHANADialect
|| dialect instanceof CockroachDialect