Commit Graph

14 Commits

Author SHA1 Message Date
Val Doroshchuk
3d7bf0626c MaterializedMySQL: Add tests to alter named collections 2023-08-04 11:50:53 +02:00
Val Doroshchuk
7da85cc0de MaterializedMySQL: Add tests for unquoted utf8 column names in DML 2023-08-03 11:53:56 +02:00
Val Doroshchuk
bd09ad6736 MaterializedMySQL: Fix typos in tests 2023-07-25 16:20:24 +02:00
Kseniia Sumarokova
e05e0ec557
Merge pull request #52318 from valbok/utf8-names
MaterializedMySQL: Support unquoted utf-8 strings in DDL
2023-07-24 21:49:33 +02:00
Alexander Tokmakov
c3e2077449
Merge branch 'master' into comment-db 2023-07-24 20:53:46 +03:00
Val Doroshchuk
efa638ef3c MaterializedMySQL: Support unquoted utf-8 strings in DDL
Since ClickHouse does not support unquoted utf-8 strings but MySQL does.

Instead of fixing Lexer to recognize utf-8 chars as TokenType::BareWord,
suggesting to quote all unrecognized tokens before applying any DDL.

Actual parsing and validating the syntax will be done by particular Parser.

If there is any TokenType::Error, the query is unable to be parsed anyway.
Quoting such tokens can provide the support of utf-8 names.

See `tryQuoteUnrecognizedTokens` and `QuoteUnrecognizedTokensTest`.

mysql> CREATE TABLE 道.渠(...

is converted to

CREATE TABLE `道`.`渠`(...

Also fixed the bug with missing * while doing SELECT in full sync because db or table name are back quoted when not needed.
2023-07-24 11:12:10 +02:00
robot-ch-test-poll4
1d6e85da91
Merge pull request #52084 from valbok/conv-charsets
MaterializedMySQL: Introduce charset conversion
2023-07-23 18:36:30 +02:00
Alexey Milovidov
7af9af1a3f
Merge pull request #52103 from azat/tests/test_materialized_mysql_database
tests: drop existing view in test_materialized_mysql_database
2023-07-22 03:41:52 +03:00
Val Doroshchuk
d16d444943 MaterializedMySQL: Add support of double quoted comments 2023-07-20 13:59:01 +02:00
Song Liyong
7837559dbf MaterializedMySQL: Support CREATE TABLE AS SELECT 2023-07-19 13:33:02 +02:00
Song Liyong
6ae5207819 MaterializedMySQL: Introduce charset conversion 2023-07-18 15:55:55 +02:00
Alexey Milovidov
0d48dca171
Update materialized_with_ddl.py 2023-07-15 20:36:16 +03:00
Azat Khuzhin
4f6d59ce7f tests: drop existing view in test_materialized_mysql_database
This should avoid failures of other tests in case of some previous test
failed

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-07-14 16:50:41 +02:00
Val Doroshchuk
24e2bae7bd MaterializedMySQL: Rename materialize_with_ddl.py -> materialized_with_ddl.py
Make it more consistent to current names.
Keep some tests with `ENGINE = MaterializeMySQL` to test BC.
2023-06-16 10:16:11 +02:00