@@ -119,8 +119,8 @@ select count(compress_chunk(x)) from show_chunks('text_table') x;
119
119
insert into text_table select 1, '' from generate_series(1, 1000) x;
120
120
insert into text_table select 2, 'same' from generate_series(1, 1000) x;
121
121
insert into text_table select 3, 'different' || x from generate_series(1, 1000) x;
122
- insert into text_table select 4, case when x % 2 = 0 then null else 'same-with-nulls ' end from generate_series(1, 1000) x;
123
- insert into text_table select 5, case when x % 2 = 0 then null else 'different-with-nulls ' || x end from generate_series(1, 1000) x;
122
+ insert into text_table select 4, case when x % 2 = 0 then null else 'samewithnulls ' end from generate_series(1, 1000) x;
123
+ insert into text_table select 5, case when x % 2 = 0 then null else 'differentwithnulls ' || x end from generate_series(1, 1000) x;
124
124
alter table text_table set (timescaledb.compress,
125
125
timescaledb.compress_segmentby = '', timescaledb.compress_orderby = 'a');
126
126
select count(compress_chunk(x)) from show_chunks('text_table') x;
@@ -133,36 +133,36 @@ NOTICE: chunk "_hyper_3_7_chunk" is already converted to columnstore
133
133
vacuum analyze text_table;
134
134
set timescaledb.debug_require_vector_agg to 'require';
135
135
select a, count(*) from text_table group by a order by count(*) desc, a limit 10;
136
- a | count
137
- ------------------------- +-------
138
- | 1000
139
- same | 1000
140
- scalar | 1000
141
- $ | 1000
142
- same-with-nulls | 500
143
- different-with-nulls1 | 1
144
- different-with-nulls101 | 1
145
- different-with-nulls103 | 1
146
- different-with-nulls105 | 1
147
- different-with-nulls107 | 1
136
+ a | count
137
+ ---------------+-------
138
+ | 1000
139
+ same | 1000
140
+ scalar | 1000
141
+ $ | 1000
142
+ samewithnulls | 500
143
+ different1 | 1
144
+ different10 | 1
145
+ different100 | 1
146
+ different1000 | 1
147
+ different101 | 1
148
148
(10 rows)
149
149
150
150
-- The hash grouping policies do not support the GroupAggregate mode in the
151
151
-- reverse order. We have to filter out the chunk where 'a' is segmentby.
152
152
set timescaledb.debug_require_vector_agg to 'forbid';
153
153
select a, count(*) from text_table where ts >= 0 group by a order by a desc limit 10;
154
- a | count
155
- -----------------+-------
156
- $ | 1000
157
- same-with-nulls | 500
158
- same | 1000
159
- different999 | 1
160
- different998 | 1
161
- different997 | 1
162
- different996 | 1
163
- different995 | 1
164
- different994 | 1
165
- different993 | 1
154
+ a | count
155
+ ----------------------- +-------
156
+ $ | 1000
157
+ samewithnulls | 500
158
+ same | 1000
159
+ differentwithnulls999 | 1
160
+ differentwithnulls997 | 1
161
+ differentwithnulls995 | 1
162
+ differentwithnulls993 | 1
163
+ differentwithnulls991 | 1
164
+ differentwithnulls99 | 1
165
+ differentwithnulls989 | 1
166
166
(10 rows)
167
167
168
168
reset timescaledb.debug_require_vector_agg;
@@ -184,18 +184,18 @@ select count(compress_chunk(x)) from show_chunks('text_table') x;
184
184
185
185
set timescaledb.debug_require_vector_agg to 'require';
186
186
select a, count(*) from text_table group by a order by a nulls first limit 10;
187
- a | count
188
- ------------------------- +-------
189
- $ | 1000
190
- | 1000
191
- different-with-nulls1 | 1
192
- different-with-nulls101 | 1
193
- different-with-nulls103 | 1
194
- different-with-nulls105 | 1
195
- different-with-nulls107 | 1
196
- different-with-nulls109 | 1
197
- different-with-nulls11 | 1
198
- different-with-nulls111 | 1
187
+ a | count
188
+ ---------------+-------
189
+ $ | 1000
190
+ | 1000
191
+ different1 | 1
192
+ different10 | 1
193
+ different100 | 1
194
+ different1000 | 1
195
+ different101 | 1
196
+ different102 | 1
197
+ different103 | 1
198
+ different104 | 1
199
199
(10 rows)
200
200
201
201
reset timescaledb.debug_require_vector_agg;
@@ -217,18 +217,18 @@ select ts, a, count(*) from text_table group by ts, a order by ts, a limit 10;
217
217
(10 rows)
218
218
219
219
select a, ts, count(*) from text_table group by a, ts order by a desc, ts desc limit 10;
220
- a | ts | count
221
- -----------------+----+-------
222
- $ | 5 | 500
223
- $ | 4 | 500
224
- scalar | -1 | 1000
225
- same-with-nulls | 4 | 500
226
- same | 2 | 1000
227
- different999 | 3 | 1
228
- different998 | 3 | 1
229
- different997 | 3 | 1
230
- different996 | 3 | 1
231
- different995 | 3 | 1
220
+ a | ts | count
221
+ ----------------------- +----+-------
222
+ $ | 5 | 500
223
+ $ | 4 | 500
224
+ scalar | -1 | 1000
225
+ samewithnulls | 4 | 500
226
+ same | 2 | 1000
227
+ differentwithnulls999 | 5 | 1
228
+ differentwithnulls997 | 5 | 1
229
+ differentwithnulls995 | 5 | 1
230
+ differentwithnulls993 | 5 | 1
231
+ differentwithnulls991 | 5 | 1
232
232
(10 rows)
233
233
234
234
reset timescaledb.debug_require_vector_agg;
0 commit comments