You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[client-v2] getTableSchema and insert concatenate the raw table name into SQL — names needing backquotes cannot be used #3089
So a valid table name that needs backquotes, like my-table, fails with a server syntax error even though the table exists.
Steps to reproduce
client.queryAll("CREATE TABLE `my-table` (id Int64) ENGINE = MergeTree ORDER BY id");
client.getTableSchema("my-table", "default"); // server syntax errorclient.insert("my-table", data, settings); // same
Expected behaviour
The parameter is documented as a table name, so the client should quote it when building the SQL:
DESCRIBE TABLE `my-table`INSERT INTO`my-table`
Back-compat: pre-quoted names (`my-table` passed by the caller) work today as a workaround, so already-quoted input should be detected and passed through unchanged (like JDBC's Statement.enquoteIdentifier).
Configuration
client-v2 0.9.5 and 0.10.0 (latest) are both affected.
Additional context
flink-connector-clickhouse uses both methods and currently has to reject table names that need quoting; once this is fixed the connector can lift that restriction (a canary test watches for it).
Be aware of situations where the table name is nice.table. When calling client.insert("nice.table", data, settings);, you need to determine whether nice.table is the full table name or whether nice is the database name and table is the table name.
For reference, ClickHouse always assumes that an unquoted, dot-separated table name consists of the database name and the table name. If we go that route, users will still need to quote table names that contain a dot.
I remember there was something so we use string as is. And this is the good use-case. In client we do not do assumptions and extra computations because for users it is much safer and easier.
@Marais then I will not change the code and will update the documentation only.
Activity
chernser commentedon Aug 31, 2026
Good day, @Marais !
Thank you for reporting this!
slabko commentedon Sep 2, 2026
Be aware of situations where the table name is
nice.table. When callingclient.insert("nice.table", data, settings);, you need to determine whethernice.tableis the full table name or whetherniceis the database name andtableis the table name.For reference, ClickHouse always assumes that an unquoted, dot-separated table name consists of the database name and the table name. If we go that route, users will still need to quote table names that contain a dot.
chernser commentedon Sep 2, 2026
@slabko I appreciate your comment!
I remember there was something so we use string as is. And this is the good use-case. In client we do not do assumptions and extra computations because for users it is much safer and easier.
@Marais then I will not change the code and will update the documentation only.
chernser commentedon Sep 25, 2026
@polyglotAI-bot update documentation