Skip to content

Commit

Permalink
HHH-18069 NullPointerException when unioning partition results
Browse files Browse the repository at this point in the history
  • Loading branch information
dreab8 authored and cigaly committed Jan 30, 2025
1 parent 0fef5d3 commit 05c0154
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1990,9 +1990,13 @@ public QueryGroup visitQueryGroup(SqmQueryGroup<?> queryGroup) {
sqmQueryPartStack.push( queryGroup );
pushProcessingState( processingState );

FromClauseIndex firstQueryPartIndex = null;
SqlAstProcessingState firstPoppedProcessingState = null;
try {
newQueryParts.add( visitQueryPart( queryParts.get( 0 ) ) );

firstQueryPartIndex = lastPoppedFromClauseIndex;
firstPoppedProcessingState = lastPoppedProcessingState;
collector.setSqmAliasedNodeCollector(
(SqmAliasedNodeCollector) lastPoppedProcessingState.getSqlExpressionResolver()
);
Expand All @@ -2010,6 +2014,8 @@ public QueryGroup visitQueryGroup(SqmQueryGroup<?> queryGroup) {
finally {
popProcessingStateStack();
sqmQueryPartStack.pop();
lastPoppedFromClauseIndex = firstQueryPartIndex;
lastPoppedProcessingState = firstPoppedProcessingState;
}
}

Expand Down

0 comments on commit 05c0154

Please sign in to comment.