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
feat: Parser Enhancements Batch 5 - ARRAY Constructor, WITHIN GROUP & JSONB Operators (#187)
Implements three new parser features:
## Issue #178: PostgreSQL JSONB Existence Operators
- Fixed token converter to properly handle ?, ?|, ?& operators
- These were incorrectly being converted to placeholder tokens
- Added proper type mappings in buildTypeMapping()
## Issue #182: PostgreSQL ARRAY Constructor Syntax
- Added TokenTypeArray (395) and TokenTypeWithin (396) token types
- Added ARRAY and WITHIN keywords to keywords.go and tokenizer.go
- Added ArrayConstructorExpression AST node with pooling
- Supports both ARRAY[...] literal and ARRAY(SELECT...) subquery syntax
- Added parseArrayConstructor() function in expressions.go
## Issue #183: SQL:2003 WITHIN GROUP Ordered-Set Aggregates
- Added WithinGroup field to FunctionCall struct
- Added parsing support in window.go parseFunctionCall()
- Supports PERCENTILE_CONT, PERCENTILE_DISC, MODE, LISTAGG
- Includes ASC/DESC and NULLS FIRST/LAST ordering
Test Coverage:
- Added array_constructor_test.go with 15+ test cases
- Added within_group_test.go with 12+ test cases
- Added json_operators_test.go parser tests
- All 26 packages pass with race detection
Closes#178, #182, #183
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Ajit Pratap Singh <ajitpratapsingh@Ajits-Mac-mini.local>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
0 commit comments