Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1499,4 +1499,9 @@ public boolean supportsRowValueConstructorSyntaxInInList() {
return false;
}

@Override
public boolean supportsRowValueConstructorSyntaxInInSubQuery() {
return true;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -912,6 +912,7 @@ public boolean supportsArrayConstructor() {

@Override
public boolean supportsRowValueConstructorSyntax() {
// It's supported but not usable due to a bug: https://sourceforge.net/p/hsqldb/bugs/1714/
return false;
}

Expand All @@ -923,11 +924,13 @@ public boolean supportsWithClauseInSubquery() {

@Override
public boolean supportsRowValueConstructorSyntaxInQuantifiedPredicates() {
// It's supported but not usable due to a bug: https://sourceforge.net/p/hsqldb/bugs/1714/
return false;
}

@Override
public boolean supportsRowValueConstructorSyntaxInInList() {
// It's supported but not usable due to a bug: https://sourceforge.net/p/hsqldb/bugs/1714/
return false;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1273,4 +1273,9 @@ public boolean supportsRowValueConstructorSyntaxInInList() {
return false;
}

@Override
public boolean supportsRowValueConstructorSyntaxInInSubQuery() {
return true;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -746,6 +746,7 @@ public boolean supportsArrayConstructor() {

@Override
public boolean supportsRowValueConstructorSyntax() {
// It's supported but not usable due to a bug: https://sourceforge.net/p/hsqldb/bugs/1714/
return false;
}

Expand All @@ -757,11 +758,13 @@ public boolean supportsWithClauseInSubquery() {

@Override
public boolean supportsRowValueConstructorSyntaxInQuantifiedPredicates() {
// It's supported but not usable due to a bug: https://sourceforge.net/p/hsqldb/bugs/1714/
return false;
}

@Override
public boolean supportsRowValueConstructorSyntaxInInList() {
// It's supported but not usable due to a bug: https://sourceforge.net/p/hsqldb/bugs/1714/
return false;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7664,7 +7664,24 @@ public void visitInListPredicate(InListPredicate inListPredicate) {
}
else if ( !dialect.supportsRowValueConstructorSyntaxInInList() ) {
// Some DBs like Oracle support tuples only for the IN subquery predicate
if ( dialect.supportsRowValueConstructorSyntaxInInSubQuery() && dialect.supportsUnionAll() ) {
if ( dialect.supportsRowValueConstructorSyntaxInInSubQuery() && dialect.supportsValuesList() ) {
inListPredicate.getTestExpression().accept( this );
if ( inListPredicate.isNegated() ) {
appendSql( " not" );
}
appendSql( " in (select * from (values" );
char separator = ' ';
for ( Expression expression : listExpressions ) {
appendSql( separator );
appendSql( OPEN_PARENTHESIS );
renderCommaSeparated( getSqlTuple( expression ).getExpressions() );
appendSql( CLOSE_PARENTHESIS );
separator = ',';
}
appendSql( CLOSE_PARENTHESIS );
appendSql( CLOSE_PARENTHESIS );
}
else if ( dialect.supportsRowValueConstructorSyntaxInInSubQuery() && dialect.supportsUnionAll() ) {
inListPredicate.getTestExpression().accept( this );
if ( inListPredicate.isNegated() ) {
appendSql( " not" );
Expand Down