Skip to content

Fix 99 format roundtrip tests#53

Merged
kyleconroy merged 1 commit intomainfrom
claude/fix-format-tests-959Jg
Dec 26, 2025
Merged

Fix 99 format roundtrip tests#53
kyleconroy merged 1 commit intomainfrom
claude/fix-format-tests-959Jg

Conversation

@kyleconroy
Copy link
Copy Markdown
Collaborator

Add comprehensive SQL formatting support to enable format roundtrip tests:

Expression formatters:

  • Subquery, LikeExpr, CaseExpr, CastExpr
  • InExpr, BetweenExpr, IsNullExpr
  • TernaryExpr, ArrayAccess, TupleAccess
  • IntervalExpr, ExtractExpr, Lambda
  • ColumnsMatcher, WithElement, ExistsExpr
  • DataType, NameTypePair, Parameter

Statement formatters:

  • SelectIntersectExceptQuery
  • SetQuery, DropQuery, CreateQuery
  • InsertQuery, AlterQuery, TruncateQuery
  • UseQuery, DescribeQuery, ShowQuery
  • ExplainQuery, OptimizeQuery, SystemQuery
  • RenameQuery, ExchangeQuery, ExistsQuery

Additional improvements:

  • Array JOIN clause formatting
  • JOIN clause with ON/USING support
  • FINAL and SAMPLE in table expressions
  • Cross join detection for comma-separated tables
  • WITH clause, PREWHERE, HAVING support
  • ORDER BY with NULLS FIRST/LAST, COLLATE, WITH FILL
  • SETTINGS and FORMAT clauses
  • Nil pointer guards for all formatters

Enabled 99 format tests by removing todo_format flags.

Add comprehensive SQL formatting support to enable format roundtrip tests:

Expression formatters:
- Subquery, LikeExpr, CaseExpr, CastExpr
- InExpr, BetweenExpr, IsNullExpr
- TernaryExpr, ArrayAccess, TupleAccess
- IntervalExpr, ExtractExpr, Lambda
- ColumnsMatcher, WithElement, ExistsExpr
- DataType, NameTypePair, Parameter

Statement formatters:
- SelectIntersectExceptQuery
- SetQuery, DropQuery, CreateQuery
- InsertQuery, AlterQuery, TruncateQuery
- UseQuery, DescribeQuery, ShowQuery
- ExplainQuery, OptimizeQuery, SystemQuery
- RenameQuery, ExchangeQuery, ExistsQuery

Additional improvements:
- Array JOIN clause formatting
- JOIN clause with ON/USING support
- FINAL and SAMPLE in table expressions
- Cross join detection for comma-separated tables
- WITH clause, PREWHERE, HAVING support
- ORDER BY with NULLS FIRST/LAST, COLLATE, WITH FILL
- SETTINGS and FORMAT clauses
- Nil pointer guards for all formatters

Enabled 99 format tests by removing todo_format flags.
@kyleconroy kyleconroy merged commit 43d9965 into main Dec 26, 2025
1 check passed
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