You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixes all ast.Format test failures by implementing comprehensive
Format methods for SQL AST nodes. Key improvements include:
- Named parameters (@param) formatting without space after @
- NULLIF expression support in A_Expr
- NULLS FIRST/LAST in ORDER BY clauses
- Type name mapping (int4→integer, timestamptz→timestamp with time zone)
- Array type support (text[]) and type modifiers (varchar(32))
- CREATE FUNCTION with parameters, options (AS, LANGUAGE), and modes
- CREATE EXTENSION statement formatting
- DO $$ ... $$ anonymous code blocks
- WITHIN GROUP clause for ordered-set aggregates
- Automatic quoting for SQL reserved words and mixed-case identifiers
- CROSS JOIN detection (JOIN without ON/USING clause)
- LATERAL keyword in subselects and function calls
- Array subscript access in UPDATE statements (names[$1])
- Proper AS keyword before aliases
Also removes unused deparse files and cleans up fmt_test.go to use
ast.Format directly.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
0 commit comments