HHH-18681 InterpretationException executing subquery in case-when : o.h.query.sqm.tree.select.SqmSelection.getExpressible() is null

This commit is contained in:
Andrea Boriero 2024-10-14 17:00:17 +02:00 committed by Andrea Boriero
parent 1fedc6e529
commit 36bc892d62
1 changed files with 4 additions and 2 deletions

View File

@ -5681,9 +5681,11 @@ public class SemanticQueryBuilder<R> extends HqlParserBaseVisitor<Object> implem
final List<SqmSelection<?>> selections = subQuery.getQuerySpec().getSelectClause().getSelections();
if ( selections.size() == 1 ) {
subQuery.applyInferableType( selections.get( 0 ).getExpressible().getSqmType() );
final SqmExpressible<?> expressible = selections.get( 0 ).getExpressible();
if ( expressible != null ) {
subQuery.applyInferableType( expressible.getSqmType() );
}
}
return subQuery;
}
finally {