fix tests

This commit is contained in:
Nikita Taranov 2024-02-12 23:54:01 +01:00
parent 91a38e73b4
commit 40ea90d672
7 changed files with 10 additions and 4 deletions

View File

@ -7,6 +7,8 @@ SET max_block_size = 10000;
SET min_insert_block_size_rows = 1000000;
SET min_insert_block_size_bytes = 0;
set max_insert_threads = 1;
INSERT INTO numbers_squashed SELECT * FROM system.numbers LIMIT 10000000;
SELECT blockSize() AS b, count() / b AS c FROM numbers_squashed GROUP BY blockSize() ORDER BY c DESC;

View File

@ -16,6 +16,8 @@ CREATE TABLE default_codec_synthetic
id UInt64 Codec(ZSTD(3))
) ENGINE MergeTree() ORDER BY tuple() SETTINGS min_bytes_for_wide_part = 0, compress_marks = false, compress_primary_key = false, ratio_of_defaults_for_sparse_serialization = 1;
set max_insert_threads = 1;
INSERT INTO delta_codec_synthetic SELECT number FROM system.numbers LIMIT 5000000;
INSERT INTO default_codec_synthetic SELECT number FROM system.numbers LIMIT 5000000;

View File

@ -25,6 +25,7 @@ CREATE TABLE buffer_ (key UInt64) Engine=Buffer(currentDatabase(), null_,
SET max_memory_usage=10e6;
SET max_block_size=100e3;
SET max_insert_threads=1;
-- Check that max_memory_usage is ignored only on flush and not on squash
SET min_insert_block_size_bytes=9e6;

View File

@ -8,7 +8,7 @@ ENGINE = MergeTree
ORDER BY number
SETTINGS index_granularity = 128, ratio_of_defaults_for_sparse_serialization = 1.0, index_granularity_bytes = '10Mi';
SET min_insert_block_size_rows = 0, min_insert_block_size_bytes = 0;
SET min_insert_block_size_rows = 0, min_insert_block_size_bytes = 0, max_insert_threads = 1;
INSERT INTO t SELECT number FROM numbers(10000000);
SET max_threads = 1, max_block_size = 12345;

View File

@ -1,5 +1,6 @@
drop table if exists test;
create table test (x AggregateFunction(uniq, UInt64), y Int64) engine=Memory;
set max_insert_threads = 1;
insert into test select uniqState(number) as x, number as y from numbers(10) group by number order by x, y;
select uniqStateMap(map(1, x)) OVER (PARTITION BY y) from test;
select uniqStateForEach([x]) OVER (PARTITION BY y) from test;

View File

@ -4,6 +4,6 @@ CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# shellcheck source=../shell_config.sh
. "$CURDIR"/../shell_config.sh
${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}&send_progress_in_http_headers=1&http_headers_progress_interval_ms=0" -d @- <<< "insert into function null('_ Int') select * from numbers(5) settings max_block_size=1" -v |& {
${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}&send_progress_in_http_headers=1&http_headers_progress_interval_ms=0" -d @- <<< "insert into function null('_ Int') select * from numbers(5) settings max_block_size=1, max_insert_threads=1" -v |& {
grep -F -e X-ClickHouse-Progress: -e X-ClickHouse-Summary: | sed 's/,\"elapsed_ns[^}]*//'
}

View File

@ -5,7 +5,7 @@ create table rmt1 (n int) engine=ReplicatedMergeTree('/test/02468/{database}', '
system stop cleanup rmt;
system stop merges rmt1;
insert into rmt select * from numbers(10) settings max_block_size=1;
insert into rmt select * from numbers(10) settings max_block_size=1, max_insert_threads=1;
alter table rmt drop partition id '0';
truncate table rmt1;
@ -31,7 +31,7 @@ create table rmt2 (n int) engine=ReplicatedMergeTree('/test/02468/{database}2',
system stop cleanup rmt;
system stop merges rmt1;
insert into rmt select * from numbers(10) settings max_block_size=1;
insert into rmt select * from numbers(10) settings max_block_size=1, max_insert_threads=1;
system sync replica rmt1 lightweight;
alter table rmt replace partition id '0' from rmt2;