Skip to content

Conversation

@xterao
Copy link
Collaborator

@xterao xterao commented Jul 25, 2025

When nested sub-group blocks are present without spacing between them, the PreProcessor may fail to insert line breaks, causing sub-groups that should be formatted on new lines to remain improperly inlined.

Fix

Ensure that a line break is always inserted before the opening parenthesis ( that denotes the start of a sub-group block.

This guarantees that nested sub-group blocks are properly separated and formatted, even when there’s no space between blocks in the original SQL.

@xterao xterao self-assigned this Jul 25, 2025
@github-actions github-actions bot added the fix Bug fixes label Jul 25, 2025
@xterao xterao linked an issue Jul 25, 2025 that may be closed by this pull request
@xterao xterao merged commit 9713bbe into feature/sql-format-official-version Jul 28, 2025
5 checks passed
@xterao xterao deleted the fix/sql-format-line-breaks-for-nested-subgroup-blocks branch July 28, 2025 00:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix Bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Formatter] Line Breaks for Nested Subgroup Blocks

2 participants