HHH-15721 NullPointerException in BaseSqmToSqlAstConverter.visitJunctionPredicate with combination of treats

This commit is contained in:
Andrea Boriero 2022-11-22 18:00:00 +01:00 committed by Andrea Boriero
parent 4de7bf20b2
commit 31fafb1d4f
1 changed files with 1 additions and 4 deletions

View File

@ -6503,10 +6503,7 @@ public abstract class BaseSqmToSqlAstConverter<T extends Statement> extends Base
boolean hasAnyTreatUsage = false;
for ( SqmPredicate subPredicate : predicate.getPredicates() ) {
disjunction.add( (Predicate) subPredicate.accept( this ) );
if ( conjunctTreatUsages.isEmpty() ) {
conjunctTreatUsagesList.add( null );
}
else {
if ( !conjunctTreatUsages.isEmpty() ) {
hasAnyTreatUsage = true;
for ( Map.Entry<SqmPath<?>, Set<String>> entry : conjunctTreatUsages.entrySet() ) {
conjunctTreatUsagesUnion.computeIfAbsent( entry.getKey(), k -> new HashSet<>() )