Skip to content

Commit f4abbcd

Browse files
authored
chore: regenerate & format slt tests (#6776)
* chore: regenerate & format slt tests * fix * fix * update
1 parent 4380c61 commit f4abbcd

File tree

179 files changed

+1380
-1026
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

179 files changed

+1380
-1026
lines changed

e2e_test/batch/aggregate/avg.slt.part

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
statement ok
32
SET RW_IMPLICIT_FLUSH TO true;
43

e2e_test/batch/aggregate/distinct.slt.part

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ select distinct sum(v1) from t group by v2;
1919
5
2020

2121
# v2, v3 can be either 2, 3 or 3, 2
22+
2223
query I
2324
select distinct on(v1) v2 + v3 from t order by v1;
2425
----

e2e_test/batch/aggregate/selective_distinct_agg.slt.part

+1-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ with z(a, b) as (select count(distinct v1), count(v2) from t) select a from z;
4040
statement ok
4141
drop table t
4242

43-
4443
statement ok
4544
create table t(x int, y int)
4645

@@ -53,4 +52,4 @@ select count(distinct x) filter (where y > 0), sum(distinct y) from t;
5352
1 3
5453

5554
statement ok
56-
drop table t
55+
drop table t

e2e_test/batch/aggregate/sort_agg.slt.part

+1-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ select v1, max(v2) from mv group by v1
2020
4 7
2121
9 3
2222

23-
2423
query II
2524
select v1, max(v2) from t group by v1 order by v1 desc
2625
----
@@ -35,4 +34,4 @@ statement ok
3534
drop materialized view mv
3635

3736
statement ok
38-
drop table t
37+
drop table t

e2e_test/batch/aggregate/timestamp.slt.part

+5-5
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ insert into t1 values
1818
query IT rowsort
1919
select sum(v), created_at from t1 group by created_at;
2020
----
21-
3 2022-01-01 11:02:00
22-
1 2022-01-01 10:52:00
23-
5 2022-01-01 10:33:00
24-
3 2022-01-01 10:15:00
25-
4 2022-01-01 10:00:00
21+
1 2022-01-01 10:52:00
22+
3 2022-01-01 10:15:00
23+
3 2022-01-01 11:02:00
24+
4 2022-01-01 10:00:00
25+
5 2022-01-01 10:33:00
2626

2727
statement ok
2828
drop table t1;

e2e_test/batch/basic/array.slt.part

+9
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ drop table t;
9595
## Test single quote style array syntax.
9696

9797
# Test assign cast.
98+
9899
statement ok
99100
create table t(arr int[]);
100101

@@ -111,6 +112,7 @@ statement ok
111112
drop table t;
112113

113114
# Test explicit and implicit cast
115+
114116
query T
115117
select pg_typeof(arr) from (values ('{1, 2, 3}'::integer[]), ('{4, 5, 6}')) as t(arr);
116118
----
@@ -124,27 +126,31 @@ integer[]
124126
integer[]
125127

126128
# Test explicit cast to float array
129+
127130
query T
128131
select pg_typeof(arr::float[]) from (values ('{1, 2, 3}'), ('{4, 5, 6}')) as t(arr);
129132
----
130133
double precision[]
131134
double precision[]
132135

133136
# Test explicit cast to varchar array
137+
134138
query T
135139
select pg_typeof(arr::varchar[]) from (values ('{1, 2, 3}'), ('{4, 5, 6}')) as t(arr);
136140
----
137141
varchar[]
138142
varchar[]
139143

140144
# Test explicit cast to nested integer array
145+
141146
query T
142147
select pg_typeof(arr::integer[][]) from (values ('{{1}, {2}, {3}}'), ('{{4}, {5}, {6}}')) as t(arr);
143148
----
144149
integer[][]
145150
integer[][]
146151

147152
# Test explicit cast to varchar array. Varchar values should be trimmed
153+
148154
query T
149155
select (arr::varchar[])[1] from (values ('{ 1 b ?, 2, 3}'), ('{ 4 a , 5, 6}')) as t(arr);
150156
----
@@ -157,6 +163,7 @@ select pg_typeof((v1::integer[][])[2][1]), (v1::integer[][])[2][1] from (values
157163
integer 2
158164

159165
# Test multiple castings of the same input.
166+
160167
query TTI
161168
select
162169
(arr::varchar[][])[1][2] as double_varchar,
@@ -167,12 +174,14 @@ from (values ('{{{1, 2, 3}, {44, 55, 66}}}')) as t(arr);
167174
{44, 55, 66} 66 66
168175

169176
# Test cast from array to string
177+
170178
query T
171179
select array['a', 'b']::varchar;
172180
----
173181
{a,b}
174182

175183
# Test array display with quoting
184+
176185
query T
177186
select array['hello', '', null, 'nULl', 'nULlx', 'aa"bb', 'mm\nn', 'uu,vv', 'yy zz'];
178187
----

e2e_test/batch/basic/array_access.slt.part

+4-3
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,15 @@ select (ARRAY['foo', 'bar'])[3];
2121
----
2222
NULL
2323

24-
statement error
24+
statement error
2525
select (ARRAY['foo', 'bar'])[];
2626

2727
# array access is not possible for non-composite types
28-
statement error
28+
29+
statement error
2930
select (1::INT)[1];
3031

31-
statement error
32+
statement error
3233
select ('a'::VARCHAR)[1];
3334

3435
query T

e2e_test/batch/basic/basic.slt.part

+1-4
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ values(1+2*3)
1111
----
1212
7
1313

14-
statement error
14+
statement error
1515
values(CAST('abc' AS BOOLEAN))
1616

1717
query I
@@ -27,13 +27,10 @@ select 1+2*3, 4*5;
2727
statement ok
2828
start transaction;
2929

30-
3130
statement ok
3231
abort;
3332

3433
query I
3534
show RW_IMPLICIT_FLUSH;
3635
----
3736
true
38-
39-

e2e_test/batch/basic/boolean.slt.part

+4-6
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,9 @@ SELECT v1 is true,
7676
v1 is null
7777
FROM TB1;
7878
----
79-
t f f t f
80-
f t t f f
81-
f t f t t
82-
83-
79+
f t f t t
80+
f t t f f
81+
t f f t f
8482

8583
statement ok
8684
DROP TABLE TB1;
@@ -126,4 +124,4 @@ select booleq(true,true),
126124
boolne('true'::bool,false),
127125
boolne('true'::bool,true);
128126
----
129-
t f f t f t t f t t f
127+
t f f t f t t f t t f

e2e_test/batch/basic/const.slt.part

-1
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,3 @@ select 42 having 2 > 1;
3636
query I
3737
select 42 having 2 < 1;
3838
----
39-

e2e_test/batch/basic/cte.slt.part

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ with cte as (select v3, v4 from t2) select t1.v1 from t1 inner join cte on t1.v2
3434
query I rowsort
3535
with cte1 as (select v3, v4 from t2), cte2 as (select v3 from cte1) select v3 from cte2;
3636
----
37-
3
3837
1
38+
3
3939

4040
query II
4141
with t1 as (values(100, 200)) select * from t1;

e2e_test/batch/basic/func.slt.part

+1-3
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ create table t (v1 int);
6969
statement ok
7070
create table b (b1 int, b2 int);
7171

72-
7372
statement ok
7473
insert into t values (2);
7574

@@ -148,7 +147,6 @@ select concat_ws(v1, v2, v3, v4, v5, v6, v7, v8) from t;
148147
----
149148
1,2,3.01,4,5.01,t
150149

151-
152150
statement ok
153151
drop table t;
154152

@@ -177,7 +175,6 @@ select split_part('abc,def,ghi,jkl', ',', -2);
177175
----
178176
ghi
179177

180-
181178
query I
182179
select char_length('hello world');
183180
----
@@ -269,6 +266,7 @@ select pg_typeof(array[1, 2]);
269266
integer[]
270267

271268
# Note that PostgreSQL still displays `integer[]` in this case.
269+
272270
query T
273271
select pg_typeof(array[array[1, 2], array[3, 4]]);
274272
----

e2e_test/batch/basic/generate_series.slt.part

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ SELECT * FROM generate_series('10'::INT,'2'::INT,'-2'::INT);
8181
4
8282
2
8383

84-
statement error
84+
statement error
8585
SELECT * FROM generate_series('2'::INT,'10'::INT,'0'::INT);
8686

8787
query I

e2e_test/batch/basic/index.slt.part

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ select v1,v2 from t1 order by v1, v2;
4242
5 6
4343

4444
statement ok
45-
drop table t1;
45+
drop table t1;

e2e_test/batch/basic/index_join.slt.part

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ statement ok
3535
drop table t;
3636

3737
statement ok
38-
drop table t2;
38+
drop table t2;

e2e_test/batch/basic/insert_expr.slt.part

+23-25
Original file line numberDiff line numberDiff line change
@@ -54,17 +54,17 @@ insert into t values (12), (6+7), (44);
5454
query I rowsort
5555
select * from t;
5656
----
57+
12
58+
13
5759
3
5860
4
61+
44
5962
5
6063
6
6164
7
6265
7
6366
8
6467
9
65-
12
66-
13
67-
44
6868

6969
statement ok
7070
drop table t;
@@ -88,54 +88,54 @@ insert into t (v1, v2, v3) values (1, 2, 3);
8888
query I rowsort
8989
select * from t;
9090
----
91-
1 3 2
92-
1 2 3
91+
1 2 3
92+
1 3 2
9393

9494
statement ok
9595
insert into t (v2, v1, v3) values (1, 2, 3);
9696

9797
query I rowsort
9898
select * from t;
9999
----
100-
1 3 2
101-
1 2 3
102-
2 1 3
100+
1 2 3
101+
1 3 2
102+
2 1 3
103103

104104
statement ok
105105
insert into t (v2, v3, v1) values (1, 2, 3);
106106

107107
query I rowsort
108108
select * from t;
109109
----
110-
1 3 2
111-
1 2 3
112-
2 1 3
113-
3 1 2
110+
1 2 3
111+
1 3 2
112+
2 1 3
113+
3 1 2
114114

115115
statement ok
116116
insert into t (v3, v1, v2) values (1, 2, 3);
117117

118118
query I rowsort
119119
select * from t;
120120
----
121-
1 3 2
122-
1 2 3
123-
2 1 3
124-
3 1 2
125-
2 3 1
121+
1 2 3
122+
1 3 2
123+
2 1 3
124+
2 3 1
125+
3 1 2
126126

127127
statement ok
128128
insert into t (v3, v2, v1) values (1, 2, 3);
129129

130130
query I rowsort
131131
select * from t;
132132
----
133-
1 3 2
134-
1 2 3
135-
2 1 3
136-
3 1 2
137-
2 3 1
138-
3 2 1
133+
1 2 3
134+
1 3 2
135+
2 1 3
136+
2 3 1
137+
3 1 2
138+
3 2 1
139139

140140
# column and table names have to be case insensitive
141141

@@ -251,8 +251,6 @@ select * from t;
251251
statement ok
252252
drop table t;
253253

254-
255-
256254
statement ok
257255
create table t (v1 int, v2 int, v3 int);
258256

e2e_test/batch/basic/insert_with_join.slt.part

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ statement ok
3333
drop table t2;
3434

3535
statement ok
36-
drop table t3;
36+
drop table t3;

e2e_test/batch/basic/join.slt.part

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,4 +85,4 @@ statement ok
8585
drop index i;
8686

8787
statement ok
88-
drop table t;
88+
drop table t;

0 commit comments

Comments
 (0)