Commit Graph

13 Commits

Author SHA1 Message Date
Robert Schulze
8ad124ef64
Fix #56258, attempt II 2023-11-10 14:03:13 +00:00
vdimir
7f24ae89d1
ASTLiteral clone all except unique_column_name 2022-05-03 10:18:18 +00:00
vdimir
a7fa253ccf
ASTLiteral clone only value 2022-05-03 10:18:18 +00:00
Azat Khuzhin
16adcc1666 Reduce memory usage for parsing collections (by using move ctor)
In case you pass array in VALUES section (ValuesBlockInputFormat), it
will be copied after it had been created.
This is not significant if array is small, however if you have huge
enough array, then this can become significant (especially for array of
bool, since for each element will be used Field anyway, and it's size is
56 byte).

Here is a simple reproducer:

    $ curl -sS 'http://127.1:8123/?input_format_values_deduce_templates_of_expressions=0' -d@- <<<"insert into function null('_ Int') values (length([0,$(yes 1, | head -n2000000 | tr -d '\n')1]))"

But note, that there is lots of work (evalute constant expressions from #6781)
after parsing collection, and so total memory usage for query does not
changed a lot (hence - no test).

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-01-15 21:13:05 +03:00
Anton Popov
699a3d9031 implement legacy_column_name_of_tuple_literal in less intrusive way 2021-08-03 21:03:24 +03:00
Anton Popov
ea9b890618
Merge branch 'master' into add-compatibility-setting 2021-06-16 21:10:56 +03:00
Anton Popov
8bd7cbd925 add compatibility setting for name of columns 2021-06-16 21:10:07 +03:00
Alexey Milovidov
447d7bb8cd Minor changes 2021-06-14 07:13:35 +03:00
Ivan
315ff4f0d9
ANTLR4 Grammar for ClickHouse and new parser (#11298) 2020-12-04 05:15:44 +03:00
Alexander Tokmakov
62ff00ee8b use WriteBuffer in formatAST(...) 2020-11-09 19:05:40 +03:00
Alexander Kuzmenkov
1d3fe23b3b review fixes 2020-04-14 20:41:06 +03:00
Alexander Kuzmenkov
35783af25d Merge remote-tracking branch 'origin/master' into HEAD 2020-04-07 03:34:39 +03:00
Ivan Lezhankin
06446b4f08 dbms/ → src/ 2020-04-03 18:14:31 +03:00