diff --git a/hibernate-community-dialects/src/main/java/org/hibernate/community/dialect/H2LegacySqlAstTranslator.java b/hibernate-community-dialects/src/main/java/org/hibernate/community/dialect/H2LegacySqlAstTranslator.java index 4739a94288..7213cd1690 100644 --- a/hibernate-community-dialects/src/main/java/org/hibernate/community/dialect/H2LegacySqlAstTranslator.java +++ b/hibernate-community-dialects/src/main/java/org/hibernate/community/dialect/H2LegacySqlAstTranslator.java @@ -411,4 +411,9 @@ public class H2LegacySqlAstTranslator extends AbstractS protected boolean supportsJoinInMutationStatementSubquery() { return false; } + + @Override + public boolean supportsFilterClause() { + return getDialect().getVersion().isSameOrAfter( 1, 4, 197 ); + } } diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/H2SqlAstTranslator.java b/hibernate-core/src/main/java/org/hibernate/dialect/H2SqlAstTranslator.java index 62b049c6c2..4554d948da 100644 --- a/hibernate-core/src/main/java/org/hibernate/dialect/H2SqlAstTranslator.java +++ b/hibernate-core/src/main/java/org/hibernate/dialect/H2SqlAstTranslator.java @@ -384,4 +384,10 @@ public class H2SqlAstTranslator extends SqlAstTranslato protected boolean supportsJoinInMutationStatementSubquery() { return false; } + + @Override + public boolean supportsFilterClause() { + // Introduction of FILTER clause https://github.com/h2database/h2database/commit/9e6dbf3baa57000f670826ede431dc7fb4cd9d9c + return true; + } }