File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed
hibernate-core/src/main/java/org/hibernate/sql/ast/spi Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -7664,7 +7664,24 @@ public void visitInListPredicate(InListPredicate inListPredicate) {
7664
7664
}
7665
7665
else if ( !dialect .supportsRowValueConstructorSyntaxInInList () ) {
7666
7666
// Some DBs like Oracle support tuples only for the IN subquery predicate
7667
- if ( dialect .supportsRowValueConstructorSyntaxInInSubQuery () && dialect .supportsUnionAll () ) {
7667
+ if ( dialect .supportsRowValueConstructorSyntaxInInSubQuery () && dialect .supportsValuesList () ) {
7668
+ inListPredicate .getTestExpression ().accept ( this );
7669
+ if ( inListPredicate .isNegated () ) {
7670
+ appendSql ( " not" );
7671
+ }
7672
+ appendSql ( " in (select * from (values" );
7673
+ char separator = ' ' ;
7674
+ for ( Expression expression : listExpressions ) {
7675
+ appendSql ( separator );
7676
+ appendSql ( OPEN_PARENTHESIS );
7677
+ renderCommaSeparated ( getSqlTuple ( expression ).getExpressions () );
7678
+ appendSql ( CLOSE_PARENTHESIS );
7679
+ separator = ',' ;
7680
+ }
7681
+ appendSql ( CLOSE_PARENTHESIS );
7682
+ appendSql ( CLOSE_PARENTHESIS );
7683
+ }
7684
+ else if ( dialect .supportsRowValueConstructorSyntaxInInSubQuery () && dialect .supportsUnionAll () ) {
7668
7685
inListPredicate .getTestExpression ().accept ( this );
7669
7686
if ( inListPredicate .isNegated () ) {
7670
7687
appendSql ( " not" );
You can’t perform that action at this time.
0 commit comments