HHH-16211 Remove type inference from like predicate's escape character

This commit is contained in:
Marco Belladelli 2023-02-27 10:46:38 +01:00 committed by Christian Beikov
parent 507bb7d2c0
commit cac60d5ba8
1 changed files with 3 additions and 3 deletions

View File

@ -6920,9 +6920,9 @@ public abstract class BaseSqmToSqlAstConverter<T extends Statement> extends Base
return new LikePredicate(
visitWithInferredType( predicate.getMatchExpression(), predicate.getPattern() ),
visitWithInferredType( predicate.getPattern(), predicate.getMatchExpression() ),
predicate.getEscapeCharacter() == null
? null
: visitWithInferredType( predicate.getEscapeCharacter(), predicate.getMatchExpression() ),
predicate.getEscapeCharacter() == null ?
null :
(Expression) visitWithInferredType( predicate.getEscapeCharacter(), () -> basicType( Character.class ) ),
predicate.isNegated(),
predicate.isCaseSensitive(),
getBooleanType()