Merge branch 'master' into less-complex

This commit is contained in:
Alexey Milovidov 2024-07-29 02:14:34 +02:00
commit 031c3aa5eb
13 changed files with 81 additions and 66 deletions

View File

@ -186,7 +186,7 @@ class IColumn;
M(Bool, allow_suspicious_ttl_expressions, false, "Reject TTL expressions that don't depend on any of table's columns. It indicates a user error most of the time.", 0) \
M(Bool, allow_suspicious_variant_types, false, "In CREATE TABLE statement allows specifying Variant type with similar variant types (for example, with different numeric or date types). Enabling this setting may introduce some ambiguity when working with values with similar types.", 0) \
M(Bool, allow_suspicious_primary_key, false, "Forbid suspicious PRIMARY KEY/ORDER BY for MergeTree (i.e. SimpleAggregateFunction)", 0) \
M(Bool, compile_expressions, false, "Compile some scalar functions and operators to native code.", 0) \
M(Bool, compile_expressions, false, "Compile some scalar functions and operators to native code. Due to a bug in the LLVM compiler infrastructure, on AArch64 machines, it is known to lead to a nullptr dereference and, consequently, server crash. Do not enable this setting.", 0) \
M(UInt64, min_count_to_compile_expression, 3, "The number of identical expressions before they are JIT-compiled", 0) \
M(Bool, compile_aggregate_expressions, true, "Compile aggregate functions to native code.", 0) \
M(UInt64, min_count_to_compile_aggregate_expression, 3, "The number of identical aggregate expressions before they are JIT-compiled", 0) \

View File

@ -810,6 +810,7 @@ bool CachedOnDiskReadBufferFromFile::nextImplStep()
{
last_caller_id = FileSegment::getCallerId();
chassert(file_offset_of_buffer_end <= read_until_position);
if (file_offset_of_buffer_end == read_until_position)
return false;
@ -1051,7 +1052,11 @@ bool CachedOnDiskReadBufferFromFile::nextImplStep()
if (download_current_segment && download_current_segment_succeeded)
chassert(file_segment.getCurrentWriteOffset() >= file_offset_of_buffer_end);
chassert(file_offset_of_buffer_end <= read_until_position);
chassert(
file_offset_of_buffer_end <= read_until_position,
fmt::format("Expected {} <= {} (size: {}, read range: {})",
file_offset_of_buffer_end, read_until_position, size, current_read_range.toString()));
}
swap(*implementation_buffer);

View File

@ -1,12 +0,0 @@
10000000
10000000 1274991808
30000000
30000000 3824991808
10000000
10000000 1274991808
30000000
30000000 3824991808
10000000
10000000 1274991808
30000000
30000000 3824991808

View File

@ -1,48 +0,0 @@
set allow_suspicious_low_cardinality_types=1;
drop table if exists perf_lc_num;
CREATE TABLE perf_lc_num(  num UInt8,  arr Array(LowCardinality(Int64)) default [num]  ) ENGINE = TinyLog;
INSERT INTO perf_lc_num (num) SELECT toUInt8(number) FROM numbers(10000000);
select sum(length(arr)) from perf_lc_num;
select sum(length(arr)), sum(num) from perf_lc_num;
INSERT INTO perf_lc_num (num) SELECT toUInt8(number) FROM numbers(10000000, 20000000);
select sum(length(arr)) from perf_lc_num;
select sum(length(arr)), sum(num) from perf_lc_num;
drop table if exists perf_lc_num;
CREATE TABLE perf_lc_num(  num UInt8,  arr Array(LowCardinality(Int64)) default [num]  ) ENGINE = Log;
INSERT INTO perf_lc_num (num) SELECT toUInt8(number) FROM numbers(10000000);
select sum(length(arr)) from perf_lc_num;
select sum(length(arr)), sum(num) from perf_lc_num;
INSERT INTO perf_lc_num (num) SELECT toUInt8(number) FROM numbers(10000000, 20000000);
select sum(length(arr)) from perf_lc_num;
select sum(length(arr)), sum(num) from perf_lc_num;
drop table if exists perf_lc_num;
CREATE TABLE perf_lc_num(  num UInt8,  arr Array(LowCardinality(Int64)) default [num]  ) ENGINE = StripeLog;
INSERT INTO perf_lc_num (num) SELECT toUInt8(number) FROM numbers(10000000);
select sum(length(arr)) from perf_lc_num;
select sum(length(arr)), sum(num) from perf_lc_num;
INSERT INTO perf_lc_num (num) SELECT toUInt8(number) FROM numbers(10000000, 20000000);
select sum(length(arr)) from perf_lc_num;
select sum(length(arr)), sum(num) from perf_lc_num;
drop table if exists perf_lc_num;

View File

@ -0,0 +1,4 @@
10000000
10000000 1274991808
30000000
30000000 3824991808

View File

@ -0,0 +1,16 @@
set allow_suspicious_low_cardinality_types = 1, max_rows_to_read = '31M';
drop table if exists perf_lc_num;
CREATE TABLE perf_lc_num( num UInt8, arr Array(LowCardinality(Int64)) default [num] ) ENGINE = TinyLog;
INSERT INTO perf_lc_num (num) SELECT toUInt8(number) FROM numbers(10000000);
select sum(length(arr)) from perf_lc_num;
select sum(length(arr)), sum(num) from perf_lc_num;
INSERT INTO perf_lc_num (num) SELECT toUInt8(number) FROM numbers(10000000, 20000000);
select sum(length(arr)) from perf_lc_num;
select sum(length(arr)), sum(num) from perf_lc_num;
drop table if exists perf_lc_num;

View File

@ -0,0 +1,4 @@
10000000
10000000 1274991808
30000000
30000000 3824991808

View File

@ -0,0 +1,16 @@
set allow_suspicious_low_cardinality_types = 1, max_rows_to_read = '31M';
drop table if exists perf_lc_num;
CREATE TABLE perf_lc_num( num UInt8, arr Array(LowCardinality(Int64)) default [num] ) ENGINE = Log;
INSERT INTO perf_lc_num (num) SELECT toUInt8(number) FROM numbers(10000000);
select sum(length(arr)) from perf_lc_num;
select sum(length(arr)), sum(num) from perf_lc_num;
INSERT INTO perf_lc_num (num) SELECT toUInt8(number) FROM numbers(10000000, 20000000);
select sum(length(arr)) from perf_lc_num;
select sum(length(arr)), sum(num) from perf_lc_num;
drop table if exists perf_lc_num;

View File

@ -0,0 +1,4 @@
10000000
10000000 1274991808
30000000
30000000 3824991808

View File

@ -0,0 +1,16 @@
set allow_suspicious_low_cardinality_types = 1, max_rows_to_read = '31M';
drop table if exists perf_lc_num;
CREATE TABLE perf_lc_num( num UInt8, arr Array(LowCardinality(Int64)) default [num] ) ENGINE = StripeLog;
INSERT INTO perf_lc_num (num) SELECT toUInt8(number) FROM numbers(10000000);
select sum(length(arr)) from perf_lc_num;
select sum(length(arr)), sum(num) from perf_lc_num;
INSERT INTO perf_lc_num (num) SELECT toUInt8(number) FROM numbers(10000000, 20000000);
select sum(length(arr)) from perf_lc_num;
select sum(length(arr)), sum(num) from perf_lc_num;
drop table if exists perf_lc_num;

View File

@ -1,4 +1,4 @@
-- Tags: long
-- Tags: long, no-tsan
drop table if exists buffer_02231;
drop table if exists out_02231;
@ -11,8 +11,8 @@ create table buffer_02231
(
key Int,
v1 AggregateFunction(groupArray, String)
) engine=Buffer(currentDatabase(), 'out_02231',
/* layers= */1,
) engine = Buffer(currentDatabase(), 'out_02231',
/* layers= */ 1,
/* min/max time */ 86400, 86400,
/* min/max rows */ 1e9, 1e9,
/* min/max bytes */ 1e12, 1e12,
@ -29,7 +29,7 @@ from in_02231
group by key;
set optimize_trivial_insert_select = 1;
insert into in_02231 select * from numbers(10e6) settings max_memory_usage='400Mi', max_threads=1;
insert into in_02231 select * from numbers(5e6) settings max_memory_usage='40Mi', max_threads=1, min_insert_block_size_rows = 10000, min_insert_block_size_bytes = '10Mi';
drop table buffer_02231;
drop table out_02231;

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,9 @@
#!/usr/bin/env bash
# Tags: long
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# shellcheck source=../shell_config.sh
. "$CURDIR"/../shell_config.sh
# This should not be too slow, even under sanitizers.
yes "SELECT throwIf(1); SELECT '.' FORMAT Values;" | head -n 1000 | $CLICKHOUSE_CLIENT --multiquery --ignore-error 2>/dev/null