Repository navigation
Commit eeee5ef
committed
feat: expand PostgreSQL TABLE and VALUES query coverage
Parse standalone TABLE and VALUES expressions through the compound-query
parser, and allow them to participate in mixed UNION, INTERSECT and EXCEPT
queries. Preserve explicit parentheses and local ORDER BY/LIMIT clauses so
emitted SQL keeps the original grouping and set-operation precedence.
Add operand completeness checks for VALUES without removing the permissive
operator handling used by existing callers. Teach the planner to unwrap
supported grouped queries and reject operands it cannot execute, rather
than constructing an incomplete plan. This adds parsing and reconstruction;
it does not implement local TABLE or VALUES execution.
Cover AST contents, nested grouping, mixed operands, quoted relations,
round trips, incomplete values and planner rejection. Verified the staged
source snapshot independently: all 45 compound-query and planner tests
passed. PostgreSQL compatibility snapshots are refreshed in a later commit
of this series after the remaining grammar additions.1 parent b20c1cc commit eeee5ef
9 files changed
Lines changed: 327 additions & 401 deletions
File tree
- include
- sql_engine
- sql_parser
- src/sql_parser
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
606 | 606 | | |
607 | 607 | | |
608 | 608 | | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
609 | 612 | | |
| 613 | + | |
610 | 614 | | |
611 | 615 | | |
612 | 616 | | |
| |||
679 | 683 | | |
680 | 684 | | |
681 | 685 | | |
| 686 | + | |
682 | 687 | | |
683 | 688 | | |
684 | 689 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
61 | 65 | | |
62 | 66 | | |
63 | 67 | | |
| |||
237 | 241 | | |
238 | 242 | | |
239 | 243 | | |
| 244 | + | |
240 | 245 | | |
241 | 246 | | |
242 | 247 | | |
| |||
0 commit comments