-
Notifications
You must be signed in to change notification settings - Fork 7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix perf-test input data and refactor two tests #4301
Conversation
Unfortunately I had to modify ASTInsertQuery outside of parser https://github.com/yandex/ClickHouse/pull/4301/files#diff-387f58c9305eb5dcc6cdb110eaf1382fR172. Is it OK, or it should be avoided? |
It's Ok. |
if (!processSingleQuery(str, ast) && !ignore_error) | ||
auto ast_to_process = ast; | ||
if (insert && insert->data) | ||
ast_to_process = nullptr; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it mean, that the client will send data in source format uncompressed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code contained an error. If client were used in multiquery
mode, than all queries after insert
insert into tbl values (1, 2, 3);
select * from system.numbers limit 10;
...etc...
were placed into insert->data
field. But it didn't lead to problems, because server had ignored data
filed of insert queries. Now server sometimes parse insert->data
, so we have to process multiquery
insert queries correctly on client side.
I don't know how this is connected with compression.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Queries were always sent to server without embedded data.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When data is sent in blocks (not embedded in query), it is compressed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Queries were always sent to server without embedded data.
This is true just for insert into ... values
queries of clickhouse-client
https://github.com/yandex/ClickHouse/blob/master/dbms/programs/client/Client.cpp#L883-L885. If there were insert-select query
, more precisely buggy insert .. values (1, 2, 3); select * from ...
query parsed with multiquery
option, it was sent with embedded query->data
, but data
was always ignored on server side: https://github.com/yandex/ClickHouse/blob/master./dbms/src/Interpreters/executeQuery.cpp#L168-L169.
Since I add logic for embedded data processing on server side it became a problem, so I split parsing of insert queries (parse each query separately, not all of them together) if they are insert queries and contain embedded data
.
Nothing have changed, native client (clickhouse-client
) will send insert queries with not embedded data in compressed blocks. I still do not understand how specified line connected with compression of data. It just query parsing and there was bug for multiqueries.
Performance test failure is expected. |
I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en
For changelog. Remove if this is non-significant change.
Category (leave one):
Short description (up to few sentences):
INSERT INTO tbl VALUES (....
to server without splitting on 'query' and 'data' parts.