Commit cb3c4b4
Fix CSV schema parsing: column names with parentheses no longer corrupt type annotation
The nameAndTypeRegex used RegexOptions.RightToLeft, which caused incorrect
splits when a column name contained parentheses. For example, the schema
"Na( )me (int)" was parsed as name="Na", type=" )me (int)" instead of
the correct name="Na( )me", type="int".
Without RightToLeft, the greedy .+ quantifier on the name group naturally
backtracks and matches the *last* "(type)" group at the end of the string,
which is the correct behaviour.
Fixes #946.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 75a7d6f commit cb3c4b4
2 files changed
Lines changed: 18 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
40 | 43 | | |
41 | 44 | | |
42 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
359 | 359 | | |
360 | 360 | | |
361 | 361 | | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
362 | 376 | | |
363 | 377 | | |
364 | 378 | | |
| |||
0 commit comments