Skip to content

Commit 28cbafa

Browse files
author
Potapov Alexander
committed
Support new Optimizer's behaviour in regression tests
1 parent b6e5430 commit 28cbafa

14 files changed

+190
-62
lines changed

expected/altorder_1.out

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -185,9 +185,11 @@ SELECT count(*) FROM atsts WHERE t @@ 'wr|qh';
185185
QUERY PLAN
186186
---------------------------------------------------
187187
Aggregate
188+
Disabled Nodes: 1
188189
-> Seq Scan on atsts
190+
Disabled Nodes: 1
189191
Filter: (t @@ '''wr'' | ''qh'''::tsquery)
190-
(3 rows)
192+
(5 rows)
191193

192194
SELECT count(*) FROM atsts WHERE t @@ 'wr|qh';
193195
count
@@ -230,9 +232,11 @@ SELECT count(*) FROM atsts WHERE d < '2016-05-16 14:21:25';
230232
QUERY PLAN
231233
-------------------------------------------------------------------------------
232234
Aggregate
235+
Disabled Nodes: 1
233236
-> Seq Scan on atsts
237+
Disabled Nodes: 1
234238
Filter: (d < 'Mon May 16 14:21:25 2016'::timestamp without time zone)
235-
(3 rows)
239+
(5 rows)
236240

237241
SELECT count(*) FROM atsts WHERE d < '2016-05-16 14:21:25';
238242
count
@@ -245,9 +249,11 @@ SELECT count(*) FROM atsts WHERE d > '2016-05-16 14:21:25';
245249
QUERY PLAN
246250
-------------------------------------------------------------------------------
247251
Aggregate
252+
Disabled Nodes: 1
248253
-> Seq Scan on atsts
254+
Disabled Nodes: 1
249255
Filter: (d > 'Mon May 16 14:21:25 2016'::timestamp without time zone)
250-
(3 rows)
256+
(5 rows)
251257

252258
SELECT count(*) FROM atsts WHERE d > '2016-05-16 14:21:25';
253259
count
@@ -264,11 +270,14 @@ SELECT id, d, d <=> '2016-05-16 14:21:25' FROM atsts WHERE t @@ 'wr&qh' ORDER BY
264270
QUERY PLAN
265271
-------------------------------------------------------------------------------------
266272
Limit
273+
Disabled Nodes: 1
267274
-> Sort
275+
Disabled Nodes: 1
268276
Sort Key: ((d <=> 'Mon May 16 14:21:25 2016'::timestamp without time zone))
269277
-> Seq Scan on atsts
278+
Disabled Nodes: 1
270279
Filter: (t @@ '''wr'' & ''qh'''::tsquery)
271-
(5 rows)
280+
(8 rows)
272281

273282
SELECT id, d, d <=> '2016-05-16 14:21:25' FROM atsts WHERE t @@ 'wr&qh' ORDER BY d <=> '2016-05-16 14:21:25' LIMIT 5;
274283
id | d | ?column?
@@ -285,11 +294,14 @@ SELECT id, d, d <=| '2016-05-16 14:21:25' FROM atsts WHERE t @@ 'wr&qh' ORDER BY
285294
QUERY PLAN
286295
-------------------------------------------------------------------------------------
287296
Limit
297+
Disabled Nodes: 1
288298
-> Sort
299+
Disabled Nodes: 1
289300
Sort Key: ((d <=| 'Mon May 16 14:21:25 2016'::timestamp without time zone))
290301
-> Seq Scan on atsts
302+
Disabled Nodes: 1
291303
Filter: (t @@ '''wr'' & ''qh'''::tsquery)
292-
(5 rows)
304+
(8 rows)
293305

294306
SELECT id, d, d <=| '2016-05-16 14:21:25' FROM atsts WHERE t @@ 'wr&qh' ORDER BY d <=| '2016-05-16 14:21:25' LIMIT 5;
295307
id | d | ?column?
@@ -306,11 +318,14 @@ SELECT id, d, d |=> '2016-05-16 14:21:25' FROM atsts WHERE t @@ 'wr&qh' ORDER BY
306318
QUERY PLAN
307319
-------------------------------------------------------------------------------------
308320
Limit
321+
Disabled Nodes: 1
309322
-> Sort
323+
Disabled Nodes: 1
310324
Sort Key: ((d |=> 'Mon May 16 14:21:25 2016'::timestamp without time zone))
311325
-> Seq Scan on atsts
326+
Disabled Nodes: 1
312327
Filter: (t @@ '''wr'' & ''qh'''::tsquery)
313-
(5 rows)
328+
(8 rows)
314329

315330
SELECT id, d, d |=> '2016-05-16 14:21:25' FROM atsts WHERE t @@ 'wr&qh' ORDER BY d |=> '2016-05-16 14:21:25' LIMIT 5;
316331
id | d | ?column?
@@ -327,10 +342,13 @@ SELECT id, d, d <=> '2016-05-16 14:21:25' FROM atsts ORDER BY d <=> '2016-05-16
327342
QUERY PLAN
328343
-------------------------------------------------------------------------------------
329344
Limit
345+
Disabled Nodes: 1
330346
-> Sort
347+
Disabled Nodes: 1
331348
Sort Key: ((d <=> 'Mon May 16 14:21:25 2016'::timestamp without time zone))
332349
-> Seq Scan on atsts
333-
(4 rows)
350+
Disabled Nodes: 1
351+
(7 rows)
334352

335353
SELECT id, d, d <=> '2016-05-16 14:21:25' FROM atsts ORDER BY d <=> '2016-05-16 14:21:25' LIMIT 5;
336354
id | d | ?column?
@@ -347,10 +365,12 @@ SELECT id, d FROM atsts WHERE t @@ 'wr&qh' AND d <= '2016-05-16 14:21:25' ORDER
347365
QUERY PLAN
348366
------------------------------------------------------------------------------------------------------------------------
349367
Sort
368+
Disabled Nodes: 1
350369
Sort Key: d
351370
-> Seq Scan on atsts
371+
Disabled Nodes: 1
352372
Filter: ((t @@ '''wr'' & ''qh'''::tsquery) AND (d <= 'Mon May 16 14:21:25 2016'::timestamp without time zone))
353-
(4 rows)
373+
(6 rows)
354374

355375
SELECT id, d FROM atsts WHERE t @@ 'wr&qh' AND d <= '2016-05-16 14:21:25' ORDER BY d;
356376
id | d
@@ -398,10 +418,12 @@ SELECT id, d FROM atsts WHERE t @@ 'wr&qh' AND d >= '2016-05-16 14:21:25' ORDER
398418
QUERY PLAN
399419
------------------------------------------------------------------------------------------------------------------------
400420
Sort
421+
Disabled Nodes: 1
401422
Sort Key: d
402423
-> Seq Scan on atsts
424+
Disabled Nodes: 1
403425
Filter: ((t @@ '''wr'' & ''qh'''::tsquery) AND (d >= 'Mon May 16 14:21:25 2016'::timestamp without time zone))
404-
(4 rows)
426+
(6 rows)
405427

406428
SELECT id, d FROM atsts WHERE t @@ 'wr&qh' AND d >= '2016-05-16 14:21:25' ORDER BY d;
407429
id | d
@@ -445,10 +467,12 @@ SELECT id, d FROM atsts WHERE t @@ 'wr&q:*' AND d >= '2016-05-16 14:21:25' ORDE
445467
QUERY PLAN
446468
-------------------------------------------------------------------------------------------------------------------------
447469
Sort
470+
Disabled Nodes: 1
448471
Sort Key: d
449472
-> Seq Scan on atsts
473+
Disabled Nodes: 1
450474
Filter: ((t @@ '''wr'' & ''q'':*'::tsquery) AND (d >= 'Mon May 16 14:21:25 2016'::timestamp without time zone))
451-
(4 rows)
475+
(6 rows)
452476

453477
SELECT id, d FROM atsts WHERE t @@ 'wr&q:*' AND d >= '2016-05-16 14:21:25' ORDER BY d;
454478
id | d

expected/altorder_hash_1.out

Lines changed: 31 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,11 @@ SELECT count(*) FROM atstsh WHERE t @@ 'wr|qh';
130130
QUERY PLAN
131131
---------------------------------------------------
132132
Aggregate
133+
Disabled Nodes: 1
133134
-> Seq Scan on atstsh
135+
Disabled Nodes: 1
134136
Filter: (t @@ '''wr'' | ''qh'''::tsquery)
135-
(3 rows)
137+
(5 rows)
136138

137139
SELECT count(*) FROM atstsh WHERE t @@ 'wr|qh';
138140
count
@@ -175,9 +177,11 @@ SELECT count(*) FROM atstsh WHERE d < '2016-05-16 14:21:25';
175177
QUERY PLAN
176178
-------------------------------------------------------------------------------
177179
Aggregate
180+
Disabled Nodes: 1
178181
-> Seq Scan on atstsh
182+
Disabled Nodes: 1
179183
Filter: (d < 'Mon May 16 14:21:25 2016'::timestamp without time zone)
180-
(3 rows)
184+
(5 rows)
181185

182186
SELECT count(*) FROM atstsh WHERE d < '2016-05-16 14:21:25';
183187
count
@@ -190,9 +194,11 @@ SELECT count(*) FROM atstsh WHERE d > '2016-05-16 14:21:25';
190194
QUERY PLAN
191195
-------------------------------------------------------------------------------
192196
Aggregate
197+
Disabled Nodes: 1
193198
-> Seq Scan on atstsh
199+
Disabled Nodes: 1
194200
Filter: (d > 'Mon May 16 14:21:25 2016'::timestamp without time zone)
195-
(3 rows)
201+
(5 rows)
196202

197203
SELECT count(*) FROM atstsh WHERE d > '2016-05-16 14:21:25';
198204
count
@@ -209,11 +215,14 @@ SELECT id, d, d <=> '2016-05-16 14:21:25' FROM atstsh WHERE t @@ 'wr&qh' ORDER B
209215
QUERY PLAN
210216
-------------------------------------------------------------------------------------
211217
Limit
218+
Disabled Nodes: 1
212219
-> Sort
220+
Disabled Nodes: 1
213221
Sort Key: ((d <=> 'Mon May 16 14:21:25 2016'::timestamp without time zone))
214222
-> Seq Scan on atstsh
223+
Disabled Nodes: 1
215224
Filter: (t @@ '''wr'' & ''qh'''::tsquery)
216-
(5 rows)
225+
(8 rows)
217226

218227
SELECT id, d, d <=> '2016-05-16 14:21:25' FROM atstsh WHERE t @@ 'wr&qh' ORDER BY d <=> '2016-05-16 14:21:25' LIMIT 5;
219228
id | d | ?column?
@@ -230,11 +239,14 @@ SELECT id, d, d <=| '2016-05-16 14:21:25' FROM atstsh WHERE t @@ 'wr&qh' ORDER B
230239
QUERY PLAN
231240
-------------------------------------------------------------------------------------
232241
Limit
242+
Disabled Nodes: 1
233243
-> Sort
244+
Disabled Nodes: 1
234245
Sort Key: ((d <=| 'Mon May 16 14:21:25 2016'::timestamp without time zone))
235246
-> Seq Scan on atstsh
247+
Disabled Nodes: 1
236248
Filter: (t @@ '''wr'' & ''qh'''::tsquery)
237-
(5 rows)
249+
(8 rows)
238250

239251
SELECT id, d, d <=| '2016-05-16 14:21:25' FROM atstsh WHERE t @@ 'wr&qh' ORDER BY d <=| '2016-05-16 14:21:25' LIMIT 5;
240252
id | d | ?column?
@@ -251,11 +263,14 @@ SELECT id, d, d |=> '2016-05-16 14:21:25' FROM atstsh WHERE t @@ 'wr&qh' ORDER B
251263
QUERY PLAN
252264
-------------------------------------------------------------------------------------
253265
Limit
266+
Disabled Nodes: 1
254267
-> Sort
268+
Disabled Nodes: 1
255269
Sort Key: ((d |=> 'Mon May 16 14:21:25 2016'::timestamp without time zone))
256270
-> Seq Scan on atstsh
271+
Disabled Nodes: 1
257272
Filter: (t @@ '''wr'' & ''qh'''::tsquery)
258-
(5 rows)
273+
(8 rows)
259274

260275
SELECT id, d, d |=> '2016-05-16 14:21:25' FROM atstsh WHERE t @@ 'wr&qh' ORDER BY d |=> '2016-05-16 14:21:25' LIMIT 5;
261276
id | d | ?column?
@@ -272,10 +287,13 @@ SELECT id, d, d <=> '2016-05-16 14:21:25' FROM atstsh ORDER BY d <=> '2016-05-16
272287
QUERY PLAN
273288
-------------------------------------------------------------------------------------
274289
Limit
290+
Disabled Nodes: 1
275291
-> Sort
292+
Disabled Nodes: 1
276293
Sort Key: ((d <=> 'Mon May 16 14:21:25 2016'::timestamp without time zone))
277294
-> Seq Scan on atstsh
278-
(4 rows)
295+
Disabled Nodes: 1
296+
(7 rows)
279297

280298
SELECT id, d, d <=> '2016-05-16 14:21:25' FROM atstsh ORDER BY d <=> '2016-05-16 14:21:25' LIMIT 5;
281299
id | d | ?column?
@@ -292,10 +310,12 @@ SELECT id, d FROM atstsh WHERE t @@ 'wr&qh' AND d <= '2016-05-16 14:21:25' ORDE
292310
QUERY PLAN
293311
------------------------------------------------------------------------------------------------------------------------
294312
Sort
313+
Disabled Nodes: 1
295314
Sort Key: d
296315
-> Seq Scan on atstsh
316+
Disabled Nodes: 1
297317
Filter: ((t @@ '''wr'' & ''qh'''::tsquery) AND (d <= 'Mon May 16 14:21:25 2016'::timestamp without time zone))
298-
(4 rows)
318+
(6 rows)
299319

300320
SELECT id, d FROM atstsh WHERE t @@ 'wr&qh' AND d <= '2016-05-16 14:21:25' ORDER BY d;
301321
id | d
@@ -316,10 +336,12 @@ SELECT id, d FROM atstsh WHERE t @@ 'wr&qh' AND d >= '2016-05-16 14:21:25' ORDE
316336
QUERY PLAN
317337
------------------------------------------------------------------------------------------------------------------------
318338
Sort
339+
Disabled Nodes: 1
319340
Sort Key: d
320341
-> Seq Scan on atstsh
342+
Disabled Nodes: 1
321343
Filter: ((t @@ '''wr'' & ''qh'''::tsquery) AND (d >= 'Mon May 16 14:21:25 2016'::timestamp without time zone))
322-
(4 rows)
344+
(6 rows)
323345

324346
SELECT id, d FROM atstsh WHERE t @@ 'wr&qh' AND d >= '2016-05-16 14:21:25' ORDER BY d;
325347
id | d

expected/array.out

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,8 +521,9 @@ EXPLAIN (COSTS OFF) SELECT * FROM test_array WHERE i % '{}';
521521
QUERY PLAN
522522
----------------------------------
523523
Seq Scan on test_array
524+
Disabled Nodes: 1
524525
Filter: (i % '{}'::smallint[])
525-
(2 rows)
526+
(3 rows)
526527

527528
EXPLAIN (COSTS OFF) SELECT * FROM test_array WHERE i && '{1}' ORDER BY add_info <=> '2016-05-16 14:21:25' LIMIT 10;
528529
QUERY PLAN

expected/array_1.out

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,8 +521,9 @@ EXPLAIN (COSTS OFF) SELECT * FROM test_array WHERE i % '{}';
521521
QUERY PLAN
522522
----------------------------------
523523
Seq Scan on test_array
524+
Disabled Nodes: 1
524525
Filter: (i % '{}'::smallint[])
525-
(2 rows)
526+
(3 rows)
526527

527528
EXPLAIN (COSTS OFF) SELECT * FROM test_array WHERE i && '{1}' ORDER BY add_info <=> '2016-05-16 14:21:25' LIMIT 10;
528529
QUERY PLAN

0 commit comments

Comments
 (0)