HHH-15744 HQL where clause parsing fails with StackOverflow exception

This commit is contained in:
Andrea Boriero 2022-12-05 13:14:35 +01:00 committed by Andrea Boriero
parent 5a89c34127
commit c29f2eaf60
1 changed files with 4 additions and 14 deletions

View File

@ -850,8 +850,9 @@ public class QuerySplitter {
@Override
public SqmGroupedPredicate visitGroupedPredicate(SqmGroupedPredicate predicate) {
final SqmPredicate subPredicate = (SqmPredicate) predicate.getSubPredicate().accept( this );
return new SqmGroupedPredicate(
(SqmPredicate) predicate.accept( this ),
subPredicate,
getCreationContext().getNodeBuilder()
);
}
@ -962,25 +963,14 @@ public class QuerySplitter {
);
}
@Override
public SqmPositionalParameter visitPositionalParameterExpression(SqmPositionalParameter<?> expression) {
return new SqmPositionalParameter(
expression.getPosition(),
expression.allowMultiValuedBinding(),
expression.nodeBuilder()
);
return expression;
}
@Override
public SqmNamedParameter visitNamedParameterExpression(SqmNamedParameter<?> expression) {
return new SqmNamedParameter(
expression.getName(),
expression.allowMultiValuedBinding(),
expression.getNodeType(),
expression.nodeBuilder()
);
return expression;
}
@Override