From 77f428c7e6271a4af60d7575c150ef3d5ef67931 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 000000000000..508dfbeb4251 --- /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