clickhouse-client --queries-file
broken for INSERT INTO
statements on multiple lines
#50471
Labels
clickhouse-client --queries-file
broken for INSERT INTO
statements on multiple lines
#50471
When using
clickhouse-client
with the--queries-file
parameter, validINSERT INTO
queries fail when there are newlines between values to inserthttps://fiddle.clickhouse.com/86e1674a-31b8-43fe-8588-4af5f07bf6aa
Does it reproduce on recent release?
Yes
How to reproduce
--queries-fine
(bug does not appear when using interactive queries)CREATE TABLE
statements for all tables involved:Expected behavior
Expect
INSERT INTO
to not fail when newlines are between valuesError message and/or stacktrace
Code: 62. DB::Exception: Syntax error: failed at position 2 ('1232'): 1232, 'John2', 33);
. Expected one of: SELECT query, possibly with UNION, list of union elements, SELECT query, subquery, possibly with UNION, SELECT subquery, SELECT query, WITH, FROM, SELECT, EXPLAIN. (SYNTAX_ERROR)
Additional context
We have some scripts setup to create tables and insert data into clickhouse table using
clickhouse-client --queries-file
. It is unmanageable to have all values on a single line and the scripts get broken by any SQL formatting tool.This is also prevents us from automating some things as we have to exclude
INSERT INTO
statements and execute interactively instead (without --queries-file)The text was updated successfully, but these errors were encountered: