ClickHouse/tests/integration/test_materialized_mysql_database
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
..
configs MaterializedMySQL: Add test_named_collections 2023-06-13 10:09:12 +02:00
__init__.py rename MaterializeMySQL to MaterializedMySQL 2021-07-26 21:17:28 +03:00
materialized_with_ddl.py MaterializedMySQL: Support unquoted utf-8 strings in DDL 2023-07-24 11:12:10 +02:00
test.py MaterializedMySQL: Support unquoted utf-8 strings in DDL 2023-07-24 11:12:10 +02:00