You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tests/sqllogictests/suites/ee/07_hilbert_clustering/07_0000_recluster_final.test
+7-7Lines changed: 7 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -41,7 +41,7 @@ select count() from fuse_snapshot('test_hilbert','t');
41
41
----
42
42
4
43
43
44
-
query T
44
+
query TTT
45
45
select * EXCLUDE(timestamp) from clustering_information('test_hilbert','t');
46
46
----
47
47
(a, b) hilbert {"partial_block_count":0,"partial_segment_count":0,"stable_block_count":0,"stable_segment_count":0,"total_block_count":4,"total_segment_count":4,"unclustered_block_count":4,"unclustered_segment_count":4}
@@ -69,7 +69,7 @@ insert into t values(9, 9);
69
69
statement ok
70
70
alter table t recluster final;
71
71
72
-
query T
72
+
query TTT
73
73
select * EXCLUDE(timestamp) from clustering_information('test_hilbert','t');
74
74
----
75
75
(a, b) hilbert {"partial_block_count":1,"partial_segment_count":1,"stable_block_count":4,"stable_segment_count":2,"total_block_count":5,"total_segment_count":3,"unclustered_block_count":0,"unclustered_segment_count":0}
@@ -89,15 +89,15 @@ select block_count,row_count from fuse_segment('test_hilbert','t');
89
89
statement ok
90
90
alter table t cluster by hilbert(b, a);
91
91
92
-
query T
92
+
query TTT
93
93
select * EXCLUDE(timestamp) from clustering_information('test_hilbert','t');
94
94
----
95
95
(b, a) hilbert {"partial_block_count":0,"partial_segment_count":0,"stable_block_count":0,"stable_segment_count":0,"total_block_count":5,"total_segment_count":3,"unclustered_block_count":5,"unclustered_segment_count":3}
96
96
97
97
statement ok
98
98
alter table t recluster final;
99
99
100
-
query T
100
+
query TTT
101
101
select * EXCLUDE(timestamp) from clustering_information('test_hilbert','t');
102
102
----
103
103
(b, a) hilbert {"partial_block_count":0,"partial_segment_count":0,"stable_block_count":5,"stable_segment_count":2,"total_block_count":5,"total_segment_count":2,"unclustered_block_count":0,"unclustered_segment_count":0}
@@ -106,7 +106,7 @@ select * EXCLUDE(timestamp) from clustering_information('test_hilbert','t');
106
106
# force eval as linear clustering by specify columns #
select * EXCLUDE(timestamp) from clustering_information('test_hilbert','t', 'a,b');
111
111
----
112
112
(a, b) linear {"average_depth":1.4,"average_overlaps":0.4,"block_depth_histogram":{"00001":3,"00002":2},"constant_block_count":0,"total_block_count":5}
@@ -122,7 +122,7 @@ statement ok
122
122
create or replace table t_linear(a int, b int) cluster by (a, b) row_per_block=2 block_per_segment=2;
123
123
124
124
# no
125
-
query T
125
+
query TTT
126
126
select * EXCLUDE(timestamp) from clustering_information('test_hilbert','t_linear');
127
127
----
128
128
(a, b) linear {"average_depth":0.0,"average_overlaps":0.0,"block_depth_histogram":{},"constant_block_count":0,"total_block_count":0}
@@ -145,7 +145,7 @@ set enable_parallel_multi_merge_sort = 0;
145
145
statement ok
146
146
alter table t_linear recluster final;
147
147
148
-
query T
148
+
query TTT
149
149
select * EXCLUDE(timestamp) from clustering_information('test_hilbert','t_linear');
150
150
----
151
151
(a, b) linear {"average_depth":1.0,"average_overlaps":0.0,"block_depth_histogram":{"00001":4},"constant_block_count":0,"total_block_count":4}
## Unless required by applicable law or agreed to in writing, software
10
+
## distributed under the License is distributed on an "AS IS" BASIS,
11
+
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+
## See the License for the specific language governing permissions and
13
+
## limitations under the License.
14
+
15
+
statement ok
16
+
CREATE OR REPLACE DATABASE test_hilbert_2;
17
+
18
+
statement ok
19
+
use test_hilbert_2
20
+
21
+
statement ok
22
+
create or replace table t(a string, b int) cluster by hilbert(substring(a, 1, 5), b) row_per_block=2 block_size_threshold = 18;
23
+
24
+
statement ok
25
+
insert into t values('b', 2), ('c', 4);
26
+
27
+
statement ok
28
+
insert into t values('a', 3),('d', 1);
29
+
30
+
statement ok
31
+
alter table t recluster final;
32
+
33
+
query TTT
34
+
select cluster_key, type, info from clustering_information('test_hilbert_2','t');
35
+
----
36
+
(SUBSTRING(a FROM 1 FOR 5), b) hilbert {"partial_block_count":2,"partial_segment_count":1,"stable_block_count":0,"stable_segment_count":0,"total_block_count":2,"total_segment_count":1,"unclustered_block_count":0,"unclustered_segment_count":0}
0 commit comments