Skip to content

Support new Optimizer's behaviour in regression tests #141

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 34 additions & 10 deletions expected/altorder_1.out
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,11 @@ SELECT count(*) FROM atsts WHERE t @@ 'wr|qh';
QUERY PLAN
---------------------------------------------------
Aggregate
Disabled Nodes: 1
-> Seq Scan on atsts
Disabled Nodes: 1
Filter: (t @@ '''wr'' | ''qh'''::tsquery)
(3 rows)
(5 rows)

SELECT count(*) FROM atsts WHERE t @@ 'wr|qh';
count
Expand Down Expand Up @@ -230,9 +232,11 @@ SELECT count(*) FROM atsts WHERE d < '2016-05-16 14:21:25';
QUERY PLAN
-------------------------------------------------------------------------------
Aggregate
Disabled Nodes: 1
-> Seq Scan on atsts
Disabled Nodes: 1
Filter: (d < 'Mon May 16 14:21:25 2016'::timestamp without time zone)
(3 rows)
(5 rows)

SELECT count(*) FROM atsts WHERE d < '2016-05-16 14:21:25';
count
Expand All @@ -245,9 +249,11 @@ SELECT count(*) FROM atsts WHERE d > '2016-05-16 14:21:25';
QUERY PLAN
-------------------------------------------------------------------------------
Aggregate
Disabled Nodes: 1
-> Seq Scan on atsts
Disabled Nodes: 1
Filter: (d > 'Mon May 16 14:21:25 2016'::timestamp without time zone)
(3 rows)
(5 rows)

SELECT count(*) FROM atsts WHERE d > '2016-05-16 14:21:25';
count
Expand All @@ -264,11 +270,14 @@ SELECT id, d, d <=> '2016-05-16 14:21:25' FROM atsts WHERE t @@ 'wr&qh' ORDER BY
QUERY PLAN
-------------------------------------------------------------------------------------
Limit
Disabled Nodes: 1
-> Sort
Disabled Nodes: 1
Sort Key: ((d <=> 'Mon May 16 14:21:25 2016'::timestamp without time zone))
-> Seq Scan on atsts
Disabled Nodes: 1
Filter: (t @@ '''wr'' & ''qh'''::tsquery)
(5 rows)
(8 rows)

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;
id | d | ?column?
Expand All @@ -285,11 +294,14 @@ SELECT id, d, d <=| '2016-05-16 14:21:25' FROM atsts WHERE t @@ 'wr&qh' ORDER BY
QUERY PLAN
-------------------------------------------------------------------------------------
Limit
Disabled Nodes: 1
-> Sort
Disabled Nodes: 1
Sort Key: ((d <=| 'Mon May 16 14:21:25 2016'::timestamp without time zone))
-> Seq Scan on atsts
Disabled Nodes: 1
Filter: (t @@ '''wr'' & ''qh'''::tsquery)
(5 rows)
(8 rows)

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;
id | d | ?column?
Expand All @@ -306,11 +318,14 @@ SELECT id, d, d |=> '2016-05-16 14:21:25' FROM atsts WHERE t @@ 'wr&qh' ORDER BY
QUERY PLAN
-------------------------------------------------------------------------------------
Limit
Disabled Nodes: 1
-> Sort
Disabled Nodes: 1
Sort Key: ((d |=> 'Mon May 16 14:21:25 2016'::timestamp without time zone))
-> Seq Scan on atsts
Disabled Nodes: 1
Filter: (t @@ '''wr'' & ''qh'''::tsquery)
(5 rows)
(8 rows)

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;
id | d | ?column?
Expand All @@ -327,10 +342,13 @@ SELECT id, d, d <=> '2016-05-16 14:21:25' FROM atsts ORDER BY d <=> '2016-05-16
QUERY PLAN
-------------------------------------------------------------------------------------
Limit
Disabled Nodes: 1
-> Sort
Disabled Nodes: 1
Sort Key: ((d <=> 'Mon May 16 14:21:25 2016'::timestamp without time zone))
-> Seq Scan on atsts
(4 rows)
Disabled Nodes: 1
(7 rows)

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

SELECT id, d FROM atsts WHERE t @@ 'wr&qh' AND d <= '2016-05-16 14:21:25' ORDER BY d;
id | d
Expand Down Expand Up @@ -398,10 +418,12 @@ SELECT id, d FROM atsts WHERE t @@ 'wr&qh' AND d >= '2016-05-16 14:21:25' ORDER
QUERY PLAN
------------------------------------------------------------------------------------------------------------------------
Sort
Disabled Nodes: 1
Sort Key: d
-> Seq Scan on atsts
Disabled Nodes: 1
Filter: ((t @@ '''wr'' & ''qh'''::tsquery) AND (d >= 'Mon May 16 14:21:25 2016'::timestamp without time zone))
(4 rows)
(6 rows)

SELECT id, d FROM atsts WHERE t @@ 'wr&qh' AND d >= '2016-05-16 14:21:25' ORDER BY d;
id | d
Expand Down Expand Up @@ -445,10 +467,12 @@ SELECT id, d FROM atsts WHERE t @@ 'wr&q:*' AND d >= '2016-05-16 14:21:25' ORDE
QUERY PLAN
-------------------------------------------------------------------------------------------------------------------------
Sort
Disabled Nodes: 1
Sort Key: d
-> Seq Scan on atsts
Disabled Nodes: 1
Filter: ((t @@ '''wr'' & ''q'':*'::tsquery) AND (d >= 'Mon May 16 14:21:25 2016'::timestamp without time zone))
(4 rows)
(6 rows)

SELECT id, d FROM atsts WHERE t @@ 'wr&q:*' AND d >= '2016-05-16 14:21:25' ORDER BY d;
id | d
Expand Down
40 changes: 31 additions & 9 deletions expected/altorder_hash_1.out
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,11 @@ SELECT count(*) FROM atstsh WHERE t @@ 'wr|qh';
QUERY PLAN
---------------------------------------------------
Aggregate
Disabled Nodes: 1
-> Seq Scan on atstsh
Disabled Nodes: 1
Filter: (t @@ '''wr'' | ''qh'''::tsquery)
(3 rows)
(5 rows)

SELECT count(*) FROM atstsh WHERE t @@ 'wr|qh';
count
Expand Down Expand Up @@ -175,9 +177,11 @@ SELECT count(*) FROM atstsh WHERE d < '2016-05-16 14:21:25';
QUERY PLAN
-------------------------------------------------------------------------------
Aggregate
Disabled Nodes: 1
-> Seq Scan on atstsh
Disabled Nodes: 1
Filter: (d < 'Mon May 16 14:21:25 2016'::timestamp without time zone)
(3 rows)
(5 rows)

SELECT count(*) FROM atstsh WHERE d < '2016-05-16 14:21:25';
count
Expand All @@ -190,9 +194,11 @@ SELECT count(*) FROM atstsh WHERE d > '2016-05-16 14:21:25';
QUERY PLAN
-------------------------------------------------------------------------------
Aggregate
Disabled Nodes: 1
-> Seq Scan on atstsh
Disabled Nodes: 1
Filter: (d > 'Mon May 16 14:21:25 2016'::timestamp without time zone)
(3 rows)
(5 rows)

SELECT count(*) FROM atstsh WHERE d > '2016-05-16 14:21:25';
count
Expand All @@ -209,11 +215,14 @@ SELECT id, d, d <=> '2016-05-16 14:21:25' FROM atstsh WHERE t @@ 'wr&qh' ORDER B
QUERY PLAN
-------------------------------------------------------------------------------------
Limit
Disabled Nodes: 1
-> Sort
Disabled Nodes: 1
Sort Key: ((d <=> 'Mon May 16 14:21:25 2016'::timestamp without time zone))
-> Seq Scan on atstsh
Disabled Nodes: 1
Filter: (t @@ '''wr'' & ''qh'''::tsquery)
(5 rows)
(8 rows)

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;
id | d | ?column?
Expand All @@ -230,11 +239,14 @@ SELECT id, d, d <=| '2016-05-16 14:21:25' FROM atstsh WHERE t @@ 'wr&qh' ORDER B
QUERY PLAN
-------------------------------------------------------------------------------------
Limit
Disabled Nodes: 1
-> Sort
Disabled Nodes: 1
Sort Key: ((d <=| 'Mon May 16 14:21:25 2016'::timestamp without time zone))
-> Seq Scan on atstsh
Disabled Nodes: 1
Filter: (t @@ '''wr'' & ''qh'''::tsquery)
(5 rows)
(8 rows)

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;
id | d | ?column?
Expand All @@ -251,11 +263,14 @@ SELECT id, d, d |=> '2016-05-16 14:21:25' FROM atstsh WHERE t @@ 'wr&qh' ORDER B
QUERY PLAN
-------------------------------------------------------------------------------------
Limit
Disabled Nodes: 1
-> Sort
Disabled Nodes: 1
Sort Key: ((d |=> 'Mon May 16 14:21:25 2016'::timestamp without time zone))
-> Seq Scan on atstsh
Disabled Nodes: 1
Filter: (t @@ '''wr'' & ''qh'''::tsquery)
(5 rows)
(8 rows)

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;
id | d | ?column?
Expand All @@ -272,10 +287,13 @@ SELECT id, d, d <=> '2016-05-16 14:21:25' FROM atstsh ORDER BY d <=> '2016-05-16
QUERY PLAN
-------------------------------------------------------------------------------------
Limit
Disabled Nodes: 1
-> Sort
Disabled Nodes: 1
Sort Key: ((d <=> 'Mon May 16 14:21:25 2016'::timestamp without time zone))
-> Seq Scan on atstsh
(4 rows)
Disabled Nodes: 1
(7 rows)

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

SELECT id, d FROM atstsh WHERE t @@ 'wr&qh' AND d <= '2016-05-16 14:21:25' ORDER BY d;
id | d
Expand All @@ -316,10 +336,12 @@ SELECT id, d FROM atstsh WHERE t @@ 'wr&qh' AND d >= '2016-05-16 14:21:25' ORDE
QUERY PLAN
------------------------------------------------------------------------------------------------------------------------
Sort
Disabled Nodes: 1
Sort Key: d
-> Seq Scan on atstsh
Disabled Nodes: 1
Filter: ((t @@ '''wr'' & ''qh'''::tsquery) AND (d >= 'Mon May 16 14:21:25 2016'::timestamp without time zone))
(4 rows)
(6 rows)

SELECT id, d FROM atstsh WHERE t @@ 'wr&qh' AND d >= '2016-05-16 14:21:25' ORDER BY d;
id | d
Expand Down
3 changes: 2 additions & 1 deletion expected/array.out
Original file line number Diff line number Diff line change
Expand Up @@ -521,8 +521,9 @@ EXPLAIN (COSTS OFF) SELECT * FROM test_array WHERE i % '{}';
QUERY PLAN
----------------------------------
Seq Scan on test_array
Disabled Nodes: 1
Filter: (i % '{}'::smallint[])
(2 rows)
(3 rows)

EXPLAIN (COSTS OFF) SELECT * FROM test_array WHERE i && '{1}' ORDER BY add_info <=> '2016-05-16 14:21:25' LIMIT 10;
QUERY PLAN
Expand Down
3 changes: 2 additions & 1 deletion expected/array_1.out
Original file line number Diff line number Diff line change
Expand Up @@ -521,8 +521,9 @@ EXPLAIN (COSTS OFF) SELECT * FROM test_array WHERE i % '{}';
QUERY PLAN
----------------------------------
Seq Scan on test_array
Disabled Nodes: 1
Filter: (i % '{}'::smallint[])
(2 rows)
(3 rows)

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