Skip to content

Commit 1429367

Browse files
authored
Make the vector_agg_groupagg test collation-independent (#8650)
The dashes can sort differently based on collation, so the test can fail depending on the locale. Remove the dashes to fix.
1 parent f101bcb commit 1429367

File tree

2 files changed

+52
-52
lines changed

2 files changed

+52
-52
lines changed

tsl/test/expected/vector_agg_groupagg.out

Lines changed: 50 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@ select count(compress_chunk(x)) from show_chunks('text_table') x;
119119
insert into text_table select 1, '' from generate_series(1, 1000) x;
120120
insert into text_table select 2, 'same' from generate_series(1, 1000) x;
121121
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;
124124
alter table text_table set (timescaledb.compress,
125125
timescaledb.compress_segmentby = '', timescaledb.compress_orderby = 'a');
126126
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
133133
vacuum analyze text_table;
134134
set timescaledb.debug_require_vector_agg to 'require';
135135
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
148148
(10 rows)
149149

150150
-- The hash grouping policies do not support the GroupAggregate mode in the
151151
-- reverse order. We have to filter out the chunk where 'a' is segmentby.
152152
set timescaledb.debug_require_vector_agg to 'forbid';
153153
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
166166
(10 rows)
167167

168168
reset timescaledb.debug_require_vector_agg;
@@ -184,18 +184,18 @@ select count(compress_chunk(x)) from show_chunks('text_table') x;
184184

185185
set timescaledb.debug_require_vector_agg to 'require';
186186
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
199199
(10 rows)
200200

201201
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;
217217
(10 rows)
218218

219219
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
232232
(10 rows)
233233

234234
reset timescaledb.debug_require_vector_agg;

tsl/test/sql/vector_agg_groupagg.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ select count(compress_chunk(x)) from show_chunks('text_table') x;
6363
insert into text_table select 1, '' from generate_series(1, 1000) x;
6464
insert into text_table select 2, 'same' from generate_series(1, 1000) x;
6565
insert into text_table select 3, 'different' || x from generate_series(1, 1000) x;
66-
insert into text_table select 4, case when x % 2 = 0 then null else 'same-with-nulls' end from generate_series(1, 1000) x;
67-
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;
66+
insert into text_table select 4, case when x % 2 = 0 then null else 'samewithnulls' end from generate_series(1, 1000) x;
67+
insert into text_table select 5, case when x % 2 = 0 then null else 'differentwithnulls' || x end from generate_series(1, 1000) x;
6868

6969
alter table text_table set (timescaledb.compress,
7070
timescaledb.compress_segmentby = '', timescaledb.compress_orderby = 'a');

0 commit comments

Comments
 (0)