Lexer introduce heredoc#26671
Conversation
06ce4e9 to
0b62434
Compare
0b62434 to
4998388
Compare
| return false; | ||
| std::string_view here_doc(pos->begin, pos->size()); | ||
| size_t heredoc_size = here_doc.find('$', 1) + 1; | ||
| s = String(pos->begin + heredoc_size, pos->size() - heredoc_size * 2); |
| @@ -0,0 +1,4 @@ | |||
| SELECT $$VALUE$$; | |||
There was a problem hiding this comment.
Need a test with multiline values.
And also with dollar-something sequences in the middle.
$ doc$
Also a test with multiple heredocs in single query.
There was a problem hiding this comment.
Also test with cyrillic/chinese characters - both for separators and for values.
A test with non-UTF8 binary data inside doc will be also nice to have.
There was a problem hiding this comment.
Also add .sh test to check how server reacts to unfinished heredocs.
Both unfinished separator and unfinished content. Zero and non-zero size.
| SELECT $doc$VALUE$doc$; | ||
| SELECT $doc$'VALUE'$doc$; | ||
| SELECT $doc$$do$ $ doc$ $doc $ $doco$$doc$; | ||
| SELECT $doc$$do$ $ doc$ $doc $ $doco$$doc$, $doc$$do$ $ doc$ $doc $ $doco$$doc$; |
There was a problem hiding this comment.
No multiline test?
No test with non-UTF-8?
|
Internal documentation ticket: DOCSUP-12136 |
|
@kitaisreal Still waiting for test with multiline and non-UTF-8 entries. |
* fix(clickhouse): resolve 21.8 -> 21.9 test issues This is the minimum change to make ee/clickhouse/queries/funnels/test/test_funnel_unordered.py::TestFunnelUnorderedStepsBreakdown::test_funnel_aggregate_by_groups_breakdown_group pass. There may be other tests still failing. The issue was introduced with the [addition of heredocs](ClickHouse/ClickHouse#26671) into the clickhouse syntax. heredocs use `$` as delimiters. We're using `$` for column identifiers in quite a few places, so now we need to ensure that we have quoted these before rendering into SQL. * update other snapshots * update snapshots * fix(clickhouse): quote materialized column identifiers
I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Introduce syntax for here documents. Example
SELECT $doc$VALUE$doc$.