Commit 76692bb
feat: Add UNNEST foundation - AST, lexer, and formatter support
Foundation work for UNNEST row expansion feature to handle FIX repeated groups
and other delimited string splitting with row multiplication.
Changes:
- Add Unnest variant to SqlExpression enum in AST
- Stores column expression and delimiter
- Documented as row expansion function
- Add UNNEST keyword token to lexer
- Recognized in both keyword mappings
- Update formatters to handle Unnest expressions
- AST formatter shows Unnest structure
- SQL formatter outputs UNNEST(column, 'delimiter')
- Add UNNEST to text navigation token formatting
Architecture:
- UNNEST will be an expression that causes row multiplication
- Each row with UNNEST expression splits into N rows
- NULL padding for mismatched lengths across multiple UNNEST calls
- Use case: Expanding FIX allocations like "ACC_1|ACC_2|ACC_3"
Next steps: Parser implementation, evaluator, and query executor
All tests passing (397 passed)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent f442f01 commit 76692bb
4 files changed
Lines changed: 26 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
181 | | - | |
| 181 | + | |
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
187 | 194 | | |
188 | 195 | | |
189 | 196 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
318 | 318 | | |
319 | 319 | | |
320 | 320 | | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
321 | 328 | | |
322 | 329 | | |
323 | 330 | | |
| |||
817 | 824 | | |
818 | 825 | | |
819 | 826 | | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
820 | 830 | | |
821 | 831 | | |
822 | 832 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
57 | 60 | | |
58 | 61 | | |
59 | 62 | | |
| |||
142 | 145 | | |
143 | 146 | | |
144 | 147 | | |
| 148 | + | |
145 | 149 | | |
146 | 150 | | |
147 | 151 | | |
| |||
575 | 579 | | |
576 | 580 | | |
577 | 581 | | |
| 582 | + | |
| 583 | + | |
578 | 584 | | |
579 | 585 | | |
580 | 586 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
205 | 205 | | |
206 | 206 | | |
207 | 207 | | |
| 208 | + | |
| 209 | + | |
208 | 210 | | |
209 | 211 | | |
210 | 212 | | |
| |||
0 commit comments