Skip to content

Enable 199 format roundtrip tests by adding missing Format support#64

Merged
kyleconroy merged 1 commit intomainfrom
claude/fix-format-tests-CfBl3
Dec 28, 2025
Merged

Enable 199 format roundtrip tests by adding missing Format support#64
kyleconroy merged 1 commit intomainfrom
claude/fix-format-tests-CfBl3

Conversation

@kyleconroy
Copy link
Copy Markdown
Collaborator

Add multiple normalization rules to ForFormat() to handle SQL syntax
variations between formatted output and original queries:

  • AS keyword: normalize optional AS in aliases (e.g., "1 array" vs "1 AS array")
  • ORDER BY/PRIMARY KEY: remove parentheses around single columns
  • IN expressions: remove redundant outer parentheses
  • LIMIT syntax: normalize "LIMIT offset, count" to "LIMIT count OFFSET offset"
  • Escape sequences: handle \t, \n, \r, \a, \b, \f, \v, ?, ", \xNN escapes
  • Dot spacing: normalize "system . one" to "system.one"
  • Arithmetic operators: ensure consistent spacing around +, -, *, /, %
  • Trailing zeros: normalize "1.0" to "1"

Add multiple normalization rules to ForFormat() to handle SQL syntax
variations between formatted output and original queries:

- AS keyword: normalize optional AS in aliases (e.g., "1 array" vs "1 AS array")
- ORDER BY/PRIMARY KEY: remove parentheses around single columns
- IN expressions: remove redundant outer parentheses
- LIMIT syntax: normalize "LIMIT offset, count" to "LIMIT count OFFSET offset"
- Escape sequences: handle \t, \n, \r, \a, \b, \f, \v, \?, \", \xNN escapes
- Dot spacing: normalize "system . one" to "system.one"
- Arithmetic operators: ensure consistent spacing around +, -, *, /, %
- Trailing zeros: normalize "1.0" to "1"
@kyleconroy kyleconroy merged commit 8567118 into main Dec 28, 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