From fa94338f15c9bed5a1088b01f5cdf4fa24ffb69a Mon Sep 17 00:00:00 2001 From: vdimir Date: Fri, 22 Nov 2024 15:10:42 +0000 Subject: [PATCH] add test --- ...74_squashing_transform_sparse_bug.reference | 0 .../03274_squashing_transform_sparse_bug.sql | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 tests/queries/0_stateless/03274_squashing_transform_sparse_bug.reference create mode 100644 tests/queries/0_stateless/03274_squashing_transform_sparse_bug.sql diff --git a/tests/queries/0_stateless/03274_squashing_transform_sparse_bug.reference b/tests/queries/0_stateless/03274_squashing_transform_sparse_bug.reference new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/queries/0_stateless/03274_squashing_transform_sparse_bug.sql b/tests/queries/0_stateless/03274_squashing_transform_sparse_bug.sql new file mode 100644 index 00000000000..4ea6dcc80e2 --- /dev/null +++ b/tests/queries/0_stateless/03274_squashing_transform_sparse_bug.sql @@ -0,0 +1,18 @@ + +DROP TABLE IF EXISTS t0; +DROP TABLE IF EXISTS t1; + +SET max_insert_block_size = 1; +SET min_insert_block_size_rows = 1; +SET min_insert_block_size_bytes = 1; + +CREATE TABLE t0 (x UInt64, y Tuple(UInt64, UInt64) ) ENGINE = MergeTree ORDER BY x SETTINGS ratio_of_defaults_for_sparse_serialization = 0.5; +SYSTEM STOP MERGES t0; +INSERT INTO t0 SELECT if(number % 2 = 0, 0, number) as x, (x, 0) from numbers(200) SETTINGS max_block_size = 1; + +CREATE TABLE t1 (x UInt64, y Tuple(UInt64, UInt64) ) ENGINE = MergeTree ORDER BY x; + +SET min_joined_block_size_bytes = 100; + +SET join_algorithm = 'parallel_hash'; +SELECT sum(ignore(*)) FROM t0 a FULL JOIN t1 b ON a.x = b.x FORMAT Null;