Commit b8578f4
committed
Fix unknown escape sequences in string literals to preserve backslash
Previously, when the lexer encountered an unknown escape sequence like
\S in a string, it would only write the character after the backslash,
losing the backslash itself. This caused strings like 'Win\Sys' to be
stored as 'WinSys' instead of 'Win\Sys'.
This fix preserves both the backslash and the following character for
unknown escape sequences, matching ClickHouse's behavior.
Enables 5 passing tests.1 parent c32dede commit b8578f4
6 files changed
Lines changed: 7 additions & 6 deletions
File tree
- lexer
- parser/testdata
- 01497_extract_all_groups_empty_match
- 01847_bad_like
- 02374_regexp_replace
- 02580_like_substring_search_bug
- 03031_input_format_allow_errors_num_bad_escape_sequence
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
397 | 397 | | |
398 | 398 | | |
399 | 399 | | |
400 | | - | |
| 400 | + | |
| 401 | + | |
401 | 402 | | |
402 | 403 | | |
403 | 404 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
0 commit comments