Skip to content

HHH-19497 Addresses major issue fallback implementation of "in list" predicate #10253

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
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 @@ -7643,9 +7643,6 @@ public void visitInListPredicate(InListPredicate inListPredicate) {
.getExpressions().get( 0 );
}
else if ( !dialect.supportsRowValueConstructorSyntaxInInList() ) {
final ComparisonOperator comparisonOperator = inListPredicate.isNegated() ?
ComparisonOperator.NOT_EQUAL :
ComparisonOperator.EQUAL;
// Some DBs like Oracle support tuples only for the IN subquery predicate
if ( dialect.supportsRowValueConstructorSyntaxInInSubQuery() && dialect.supportsUnionAll() ) {
inListPredicate.getTestExpression().accept( this );
Expand All @@ -7664,14 +7661,17 @@ else if ( !dialect.supportsRowValueConstructorSyntaxInInList() ) {
appendSql( CLOSE_PARENTHESIS );
}
else {
String separator = NO_SEPARATOR;
if (inListPredicate.isNegated()) {
appendSql("not ");
}
appendSql( OPEN_PARENTHESIS );
for ( Expression expression : listExpressions ) {
appendSql( separator );
String separator = NO_SEPARATOR;
for (Expression expression : listExpressions) {
appendSql(separator);
emulateTupleComparison(
lhsTuple.getExpressions(),
getSqlTuple( expression ).getExpressions(),
comparisonOperator,
SqlTupleContainer.getSqlTuple(expression).getExpressions(),
ComparisonOperator.EQUAL,
true
);
separator = " or ";
Expand Down