Skip to content

Conversation

@pyramation
Copy link
Collaborator

No description provided.

…cases

- Enhanced CaseExpr formatting with proper WHEN/THEN/ELSE alignment
- Improved WindowDef formatting for OVER clauses with PARTITION BY/ORDER BY
- Enhanced JoinExpr formatting for complex JOIN ON conditions with proper indentation
- Added containsMultilineStringLiteral helper to preserve string literal content
- Created comprehensive test suite for misc SQL scenarios including CTEs, window functions, LATERAL joins, and complex subqueries
- Fixed critical CaseExpr bug that caused 'CASE1' syntax error by ensuring proper spacing
- Generated snapshots for 6 misc test cases to visualize pretty formatting improvements
- All kitchen-sink tests now pass with AST equivalence validation

Co-Authored-By: Dan Lynch <[email protected]>
- Added tests with pretty=false for all 6 misc SQL cases to ensure no formatting is applied when pretty is disabled
- Generated 12 new snapshots (6 pretty=true, 6 pretty=false) to validate correct scoping behavior
- Verified that pretty=false produces single-line SQL output while pretty=true produces formatted SQL
- All pretty formatting logic in deparser.ts is properly guarded with this.formatter.isPretty() checks
- Ensures formatting is only applied when pretty=true, addressing scoping concerns

Co-Authored-By: Dan Lynch <[email protected]>
@pyramation pyramation closed this Jun 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants