Skip to content

Commit 3483a48

Browse files
committed
HHH-19260 - Move supportsWithClauseInSubquery() to Dialect
Signed-off-by: Jan Schatteman <[email protected]>
1 parent e48670c commit 3483a48

34 files changed

+97
-97
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -728,4 +728,9 @@ public boolean supportsSimpleQueryGrouping() {
728728
return false;
729729
}
730730

731+
@Override
732+
public boolean supportsWithClauseInSubquery() {
733+
return false;
734+
}
735+
731736
}

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -228,9 +228,4 @@ protected boolean supportsRowValueConstructorSyntaxInQuantifiedPredicates() {
228228
return false;
229229
}
230230

231-
@Override
232-
protected boolean supportsWithClauseInSubquery() {
233-
return false;
234-
}
235-
236231
}

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1312,4 +1312,9 @@ public boolean supportsRowValueConstructorSyntax() {
13121312
return false;
13131313
}
13141314

1315+
@Override
1316+
public boolean supportsWithClauseInSubquery() {
1317+
return false;
1318+
}
1319+
13151320
}

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,6 @@ protected boolean needsRecursiveKeywordInWithClause() {
7474
return false;
7575
}
7676

77-
@Override
78-
protected boolean supportsWithClauseInSubquery() {
79-
return false;
80-
}
81-
8277
@Override
8378
protected void renderTableReferenceJoins(TableGroup tableGroup, int swappedJoinIndex, boolean forceLeftJoin) {
8479
// When we are in a recursive CTE, we can't render joins on DB2...

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1096,4 +1096,9 @@ public boolean supportsRowValueConstructorDistinctFromSyntax() {
10961096
return getVersion().isSameOrAfter( 1, 4, 200 );
10971097
}
10981098

1099+
@Override
1100+
public boolean supportsWithClauseInSubquery() {
1101+
return false;
1102+
}
1103+
10991104
}

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -202,11 +202,6 @@ protected boolean shouldInlineCte(TableGroup tableGroup) {
202202
&& !getCteStatement( tableGroup.getPrimaryTableReference().getTableId() ).isRecursive();
203203
}
204204

205-
@Override
206-
protected boolean supportsWithClauseInSubquery() {
207-
return false;
208-
}
209-
210205
@Override
211206
protected String getArrayContainsFunction() {
212207
return "array_contains";

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2024,4 +2024,10 @@ public boolean supportsRowValueConstructorGtLtSyntax() {
20242024
return false;
20252025
}
20262026

2027+
@Override
2028+
public boolean supportsWithClauseInSubquery() {
2029+
// HANA doesn't seem to support correlation, so we just report false here for simplicity
2030+
return false;
2031+
}
2032+
20272033
}

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -154,12 +154,6 @@ protected boolean shouldEmulateFetchClause(QueryPart queryPart) {
154154
&& !isRowsOnlyFetchClauseType( queryPart );
155155
}
156156

157-
@Override
158-
protected boolean supportsWithClauseInSubquery() {
159-
// HANA doesn't seem to support correlation, so we just report false here for simplicity
160-
return false;
161-
}
162-
163157
@Override
164158
protected boolean isCorrelated(CteStatement cteStatement) {
165159
// Report false here, because apparently HANA does not need the "lateral" keyword to correlate a from clause subquery in a subquery

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -961,4 +961,10 @@ public boolean supportsRowValueConstructorSyntax() {
961961
return false;
962962
}
963963

964+
@Override
965+
public boolean supportsWithClauseInSubquery() {
966+
// Doesn't support correlations in the WITH clause
967+
return false;
968+
}
969+
964970
}

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -111,12 +111,6 @@ public void visitBooleanExpressionPredicate(BooleanExpressionPredicate booleanEx
111111
}
112112
}
113113

114-
@Override
115-
protected boolean supportsWithClauseInSubquery() {
116-
// Doesn't support correlations in the WITH clause
117-
return false;
118-
}
119-
120114
@Override
121115
protected boolean supportsRecursiveClauseArrayAndRowEmulation() {
122116
// Even though HSQL supports the array constructor, it's illegal to use arrays in CTEs

0 commit comments

Comments
 (0)