From 4e2d0da71b35255129a57908f1ae5e6b98c731d1 Mon Sep 17 00:00:00 2001 From: zhyass Date: Wed, 18 Oct 2023 12:33:44 +0800 Subject: [PATCH] add test --- .../mode/cluster/distributed_recluster.sql | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 tests/sqllogictests/suites/mode/cluster/distributed_recluster.sql diff --git a/tests/sqllogictests/suites/mode/cluster/distributed_recluster.sql b/tests/sqllogictests/suites/mode/cluster/distributed_recluster.sql new file mode 100644 index 0000000000000..70957f4ada0c9 --- /dev/null +++ b/tests/sqllogictests/suites/mode/cluster/distributed_recluster.sql @@ -0,0 +1,34 @@ +statement ok +drop table if exists t_recluster + +statement ok +create table t_recluster (a int not null) cluster by(a) row_per_block=3 + +statement ok +set recluster_block_size = 30 + +statement ok +insert into t_recluster select 10-number from numbers(20) + +statement ok +insert into t_recluster select 10-number from numbers(20) + +statement ok +insert into t_recluster select 10-number from numbers(20) + +statement ok +set enable_distributed_recluster = 1 + +statement ok +alter table t_recluster recluster + +query I +select count()>1 from system.metrics where metric='fuse_recluster_block_nums_to_read_total' +---- +1 + +statement ok +set enable_distributed_recluster = 0 + +statement ok +drop table if exists t_recluster