Commit bf12aba
fix: Handle nested parentheses in index parsing for JSON path indexes
The compile_index() function used a regex that couldn't handle nested
parentheses in JSON path expressions like:
(json_value(`col`, '$.path' returning char(20)))
This caused describe() output to fail round-trip parsing when the table
had JSON indexes.
Replace the regex with a proper parser that tracks parenthesis depth
and only splits on commas at the top level.
Fixes the "index reconstruction" issue in test_json.py::test_describe.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>1 parent 58534fb commit bf12aba
1 file changed
+40
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
581 | 581 | | |
582 | 582 | | |
583 | 583 | | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
584 | 623 | | |
585 | 624 | | |
586 | 625 | | |
| |||
612 | 651 | | |
613 | 652 | | |
614 | 653 | | |
615 | | - | |
| 654 | + | |
616 | 655 | | |
617 | 656 | | |
618 | 657 | | |
| |||
0 commit comments