Commit eaa6c2c
Fix correctness bugs in regexp_replace optimization
- Non-participating capture group now returns empty string instead of original input
- Newline in remainder after short match falls back to full regex
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 3f71487 commit eaa6c2c
2 files changed
Lines changed: 27 additions & 16 deletions
File tree
- datafusion
- functions/src/regex
- sqllogictest/test_files/regexp
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
502 | 502 | | |
503 | 503 | | |
504 | 504 | | |
505 | | - | |
506 | | - | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
507 | 511 | | |
508 | | - | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
509 | 516 | | |
510 | 517 | | |
511 | 518 | | |
| |||
541 | 548 | | |
542 | 549 | | |
543 | 550 | | |
544 | | - | |
545 | | - | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
546 | 558 | | |
547 | | - | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
548 | 563 | | |
549 | 564 | | |
550 | 565 | | |
| |||
Lines changed: 6 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
151 | 149 | | |
152 | | - | |
| 150 | + | |
153 | 151 | | |
154 | | - | |
155 | | - | |
| 152 | + | |
156 | 153 | | |
157 | | - | |
158 | | - | |
| 154 | + | |
159 | 155 | | |
160 | 156 | | |
161 | 157 | | |
| |||
0 commit comments