Skip to content

Fix count query transformation that renders statements invalid. - #4361

Closed
christophstrobl wants to merge 3 commits into
mainfrom
issue/4341
Closed

christophstrobl wants to merge 3 commits into
mainfrom
issue/4341

Conversation

@christophstrobl

Copy link
Copy Markdown
Member

Introduce CountSelectionSupport to unify code paths for transforming queries into their count query representation.

This PR fixes an issue where the created token stream missed to detect expressions correctly which resulted in broken rendering missing whitespaces between tokens.
Count queries for constructor expressions now also extract the respective selections.

Closes: #4341

Introduce CountSelectionSupport to unify code paths for transforming queries into their count query represenation.
This commit fixes an issue where the created token stream missed to detect expressions correctly which resulted in broken rendering missing whitespaces between tokens.
Count queries for constructor espressions now also extract the respective selections.
@christophstrobl christophstrobl changed the title Fix count query transformation that rendered statements invalid. Fix count query transformation that renders statements invalid. Sep 22, 2026
Invert the relationship between the inherited grammar interface and actual count-rendering methods so that CountSelection remains the main component for rendering the count selection while a CountQueryTransformer only implements the methods necessary for rendering.
@mp911de mp911de added the type: bug A general bug label Sep 24, 2026
@mp911de mp911de added this to the 4.0.8 (2025.1.8) milestone Oct 15, 2026
mp911de pushed a commit that referenced this pull request Oct 15, 2026
Introduce CountSelectionSupport to unify code paths for transforming queries into their count query
representation.
This commit fixes an issue where the created token stream missed to detect expressions correctly which resulted in broken rendering missing whitespaces between tokens.
Count queries for constructor expressions now also extract the respective selections.

Closes #4341
Original pull request: #4361
mp911de added a commit that referenced this pull request Oct 15, 2026
Invert the relationship between the inherited grammar interface and actual count-rendering methods so that CountSelection remains the main component for rendering the count selection while a CountQueryTransformer only implements the methods necessary for rendering.

See #4341
Original pull request: #4361
mp911de pushed a commit that referenced this pull request Oct 15, 2026
Introduce CountSelectionSupport to unify code paths for transforming queries into their count query
representation.
This commit fixes an issue where the created token stream missed to detect expressions correctly which resulted in broken rendering missing whitespaces between tokens.
Count queries for constructor expressions now also extract the respective selections.

Closes #4341
Original pull request: #4361
mp911de added a commit that referenced this pull request Oct 15, 2026
Invert the relationship between the inherited grammar interface and actual count-rendering methods so that CountSelection remains the main component for rendering the count selection while a CountQueryTransformer only implements the methods necessary for rendering.

See #4341
Original pull request: #4361
mp911de pushed a commit that referenced this pull request Oct 15, 2026
Introduce CountSelectionSupport to unify code paths for transforming queries into their count query
representation.
This commit fixes an issue where the created token stream missed to detect expressions correctly which resulted in broken rendering missing whitespaces between tokens.
Count queries for constructor expressions now also extract the respective selections.

Closes #4341
Original pull request: #4361
mp911de added a commit that referenced this pull request Oct 15, 2026
Invert the relationship between the inherited grammar interface and actual count-rendering methods so that CountSelection remains the main component for rendering the count selection while a CountQueryTransformer only implements the methods necessary for rendering.

See #4341
Original pull request: #4361
@mp911de mp911de closed this Oct 15, 2026
@mp911de
mp911de deleted the issue/4341 branch October 15, 2026 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: bug A general bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Derived count query for SELECT DISTINCT mangles select expressions into invalid JPQL

2 participants