Commit 57b6ef7
authored
feat(plsql): fill CREATE TABLE grammar gaps against Oracle 19c spec (#66)
* feat(plsql): fill CREATE TABLE grammar gaps against Oracle 19c spec
Systematic pass comparing the PL/SQL grammar against the Oracle 19c
CREATE TABLE reference. Directly unblocks the reported failure on
CREATE TABLE ... PARTITION BY RANGE ... INTERVAL (NUMTODSINTERVAL(...))
(... VALUES LESS THAN (DATE '...'))
Tier 1 — partition value clauses accept full expressions:
- range_values_clause: literal-only -> (expression | MAXVALUE)
- list_values_clause: broadened to (expression | NULL) and tuple form
for multi-column LIST partitioning; kept DEFAULT
Tier 2 — structural keywords and blockchain flexibility:
- CREATE TABLE IF NOT EXISTS
- list_partitions / composite_list_partitions / subpartition_by_list:
accept multi-column partition keys and optional AUTOMATIC
- blockchain_table_clauses: NO DROP / NO DELETE clauses now optional
- blockchain_row_retention_clause: accept 'DAYS IDLE' form
- blockchain_hash_and_data_format_clause: accept arbitrary CHAR_STRING
or DELIMITED_ID for hash algorithm and version (removed the
hardcoded SHA2_512_Q / V1_Q lexer tokens)
Tier 3 — missing top-level partition strategies (12.2+/19c):
- PARTITION BY CONSISTENT HASH (... ) PARTITIONS AUTO [SUBPARTITION ...]
- PARTITION BY PARTITIONSET {RANGE|LIST} with range_partitionset_desc
and list_partitionset_desc
Tier 4 — completeness:
- range_subpartition_desc / list_subpartition_desc / individual_hash_subparts:
accept optional read_only_clause and indexing_clause
- column_definition: accept optional annotations_clause (Oracle 23c)
New regression fixture plsql/examples/create_table_grammar_gaps.sql
covers every scenario above. Full test suite (go test ./...) is green.
* refactor(plsql): drop redundant list_partition_value_item tuple rule
Address review feedback: the parenthesized-tuple alternative in
list_partition_value was unreachable because expression -> atom
already matches LEFT_PAREN expressions RIGHT_PAREN with identical
semantics. Remove the dedicated tuple layer and rely on expression
for tuple form in multi-column LIST partitioning — same parse
coverage with simpler AST shape. Comments on range_partition_value
and list_partition_value explain why their inner alternatives stay
(clarity of intended terminals).1 parent 1d52e54 commit 57b6ef7
9 files changed
Lines changed: 49738 additions & 45877 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1299 | 1299 | | |
1300 | 1300 | | |
1301 | 1301 | | |
| 1302 | + | |
1302 | 1303 | | |
1303 | 1304 | | |
1304 | 1305 | | |
| |||
2303 | 2304 | | |
2304 | 2305 | | |
2305 | 2306 | | |
2306 | | - | |
2307 | 2307 | | |
2308 | | - | |
2309 | 2308 | | |
2310 | 2309 | | |
2311 | 2310 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3295 | 3295 | | |
3296 | 3296 | | |
3297 | 3297 | | |
3298 | | - | |
| 3298 | + | |
3299 | 3299 | | |
3300 | 3300 | | |
3301 | 3301 | | |
| |||
3395 | 3395 | | |
3396 | 3396 | | |
3397 | 3397 | | |
3398 | | - | |
| 3398 | + | |
3399 | 3399 | | |
3400 | 3400 | | |
3401 | 3401 | | |
3402 | 3402 | | |
3403 | 3403 | | |
3404 | 3404 | | |
3405 | 3405 | | |
3406 | | - | |
| 3406 | + | |
3407 | 3407 | | |
3408 | 3408 | | |
3409 | 3409 | | |
3410 | | - | |
| 3410 | + | |
3411 | 3411 | | |
3412 | 3412 | | |
3413 | 3413 | | |
| |||
3512 | 3512 | | |
3513 | 3513 | | |
3514 | 3514 | | |
| 3515 | + | |
| 3516 | + | |
| 3517 | + | |
3515 | 3518 | | |
3516 | 3519 | | |
3517 | 3520 | | |
| |||
3521 | 3524 | | |
3522 | 3525 | | |
3523 | 3526 | | |
3524 | | - | |
| 3527 | + | |
| 3528 | + | |
3525 | 3529 | | |
3526 | 3530 | | |
3527 | 3531 | | |
| |||
3553 | 3557 | | |
3554 | 3558 | | |
3555 | 3559 | | |
3556 | | - | |
| 3560 | + | |
| 3561 | + | |
3557 | 3562 | | |
3558 | 3563 | | |
3559 | 3564 | | |
| |||
3578 | 3583 | | |
3579 | 3584 | | |
3580 | 3585 | | |
| 3586 | + | |
| 3587 | + | |
| 3588 | + | |
| 3589 | + | |
| 3590 | + | |
| 3591 | + | |
| 3592 | + | |
| 3593 | + | |
| 3594 | + | |
| 3595 | + | |
| 3596 | + | |
| 3597 | + | |
| 3598 | + | |
| 3599 | + | |
| 3600 | + | |
| 3601 | + | |
| 3602 | + | |
| 3603 | + | |
| 3604 | + | |
| 3605 | + | |
| 3606 | + | |
| 3607 | + | |
| 3608 | + | |
| 3609 | + | |
| 3610 | + | |
| 3611 | + | |
| 3612 | + | |
| 3613 | + | |
| 3614 | + | |
| 3615 | + | |
| 3616 | + | |
| 3617 | + | |
| 3618 | + | |
| 3619 | + | |
| 3620 | + | |
| 3621 | + | |
| 3622 | + | |
| 3623 | + | |
| 3624 | + | |
| 3625 | + | |
| 3626 | + | |
| 3627 | + | |
| 3628 | + | |
| 3629 | + | |
| 3630 | + | |
3581 | 3631 | | |
3582 | 3632 | | |
3583 | 3633 | | |
| |||
3623 | 3673 | | |
3624 | 3674 | | |
3625 | 3675 | | |
3626 | | - | |
| 3676 | + | |
3627 | 3677 | | |
3628 | 3678 | | |
3629 | 3679 | | |
| |||
3638 | 3688 | | |
3639 | 3689 | | |
3640 | 3690 | | |
3641 | | - | |
| 3691 | + | |
3642 | 3692 | | |
3643 | 3693 | | |
3644 | 3694 | | |
3645 | | - | |
| 3695 | + | |
3646 | 3696 | | |
3647 | 3697 | | |
3648 | 3698 | | |
3649 | | - | |
| 3699 | + | |
3650 | 3700 | | |
3651 | 3701 | | |
3652 | 3702 | | |
3653 | 3703 | | |
3654 | 3704 | | |
3655 | 3705 | | |
3656 | 3706 | | |
3657 | | - | |
| 3707 | + | |
| 3708 | + | |
| 3709 | + | |
| 3710 | + | |
| 3711 | + | |
| 3712 | + | |
| 3713 | + | |
| 3714 | + | |
3658 | 3715 | | |
3659 | 3716 | | |
3660 | 3717 | | |
3661 | | - | |
| 3718 | + | |
| 3719 | + | |
| 3720 | + | |
| 3721 | + | |
| 3722 | + | |
| 3723 | + | |
| 3724 | + | |
| 3725 | + | |
| 3726 | + | |
| 3727 | + | |
| 3728 | + | |
3662 | 3729 | | |
3663 | 3730 | | |
3664 | 3731 | | |
| |||
5255 | 5322 | | |
5256 | 5323 | | |
5257 | 5324 | | |
| 5325 | + | |
5258 | 5326 | | |
5259 | 5327 | | |
5260 | 5328 | | |
| |||
9023 | 9091 | | |
9024 | 9092 | | |
9025 | 9093 | | |
| 9094 | + | |
9026 | 9095 | | |
9027 | 9096 | | |
9028 | 9097 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
0 commit comments