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 @@ -7756,7 +7756,24 @@ public void visitInListPredicate(InListPredicate inListPredicate) {
7756
7756
}
7757
7757
else if ( !dialect .supportsRowValueConstructorSyntaxInInList () ) {
7758
7758
// Some DBs like Oracle support tuples only for the IN subquery predicate
7759
- if ( dialect .supportsRowValueConstructorSyntaxInInSubQuery () && dialect .supportsUnionAll () ) {
7759
+ if ( dialect .supportsRowValueConstructorSyntaxInInSubQuery () && dialect .supportsValuesList () ) {
7760
+ inListPredicate .getTestExpression ().accept ( this );
7761
+ if ( inListPredicate .isNegated () ) {
7762
+ appendSql ( " not" );
7763
+ }
7764
+ appendSql ( " in (select * from (values" );
7765
+ char separator = ' ' ;
7766
+ for ( Expression expression : listExpressions ) {
7767
+ appendSql ( separator );
7768
+ appendSql ( OPEN_PARENTHESIS );
7769
+ renderCommaSeparated ( getSqlTuple ( expression ).getExpressions () );
7770
+ appendSql ( CLOSE_PARENTHESIS );
7771
+ separator = ',' ;
7772
+ }
7773
+ appendSql ( CLOSE_PARENTHESIS );
7774
+ appendSql ( CLOSE_PARENTHESIS );
7775
+ }
7776
+ else if ( dialect .supportsRowValueConstructorSyntaxInInSubQuery () && dialect .supportsUnionAll () ) {
7760
7777
inListPredicate .getTestExpression ().accept ( this );
7761
7778
if ( inListPredicate .isNegated () ) {
7762
7779
appendSql ( " not" );
You can’t perform that action at this time.
0 commit comments