Skip to content

Commit 790c362

Browse files
author
Artur Zakirov
committed
Fix tests
1 parent 7c8334b commit 790c362

File tree

3 files changed

+25
-9
lines changed

3 files changed

+25
-9
lines changed

expected/orderby.out

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,22 @@ SELECT id, d, d |-> '2016-05-16 14:21:25' FROM tsts WHERE t @@ 'wr&qh' ORDER BY
184184
457 | Fri May 20 20:21:22.326724 2016 | 367197.326724
185185
(5 rows)
186186

187-
--to be fixed
188-
--EXPLAIN (costs off)
189-
--SELECT id, d, d <-> '2016-05-16 14:21:25' FROM tsts ORDER BY d <-> '2016-05-16 14:21:25' LIMIT 5;
190-
--SELECT id, d, d <-> '2016-05-16 14:21:25' FROM tsts ORDER BY d <-> '2016-05-16 14:21:25' LIMIT 5;
187+
EXPLAIN (costs off)
188+
SELECT id, d, d <-> '2016-05-16 14:21:25' FROM tsts ORDER BY d <-> '2016-05-16 14:21:25' LIMIT 5;
189+
QUERY PLAN
190+
-----------------------------------------------------------------------------------
191+
Limit
192+
-> Index Scan using tsts_idx on tsts
193+
Order By: (d <-> 'Mon May 16 14:21:25 2016'::timestamp without time zone)
194+
(3 rows)
195+
196+
SELECT id, d, d <-> '2016-05-16 14:21:25' FROM tsts ORDER BY d <-> '2016-05-16 14:21:25' LIMIT 5;
197+
id | d | ?column?
198+
-----+---------------------------------+----------
199+
355 | Mon May 16 14:21:22.326724 2016 | 2.673276
200+
355 | Mon May 16 14:21:22.326724 2016 | 2.673276
201+
355 | Mon May 16 14:21:22.326724 2016 | 2.673276
202+
355 | Mon May 16 14:21:22.326724 2016 | 2.673276
203+
355 | Mon May 16 14:21:22.326724 2016 | 2.673276
204+
(5 rows)
205+

rumget.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1655,6 +1655,9 @@ preConsistentCheck(RumScanOpaque so)
16551655
if (key->orderBy)
16561656
continue;
16571657

1658+
if (key->searchMode == GIN_SEARCH_MODE_EVERYTHING)
1659+
continue;
1660+
16581661
if (!so->rumstate.canPreConsistent[key->attnum - 1])
16591662
continue;
16601663

sql/orderby.sql

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@ EXPLAIN (costs off)
4949
SELECT id, d, d |-> '2016-05-16 14:21:25' FROM tsts WHERE t @@ 'wr&qh' ORDER BY d |-> '2016-05-16 14:21:25' LIMIT 5;
5050
SELECT id, d, d |-> '2016-05-16 14:21:25' FROM tsts WHERE t @@ 'wr&qh' ORDER BY d |-> '2016-05-16 14:21:25' LIMIT 5;
5151

52-
--to be fixed
53-
--EXPLAIN (costs off)
54-
--SELECT id, d, d <-> '2016-05-16 14:21:25' FROM tsts ORDER BY d <-> '2016-05-16 14:21:25' LIMIT 5;
55-
--SELECT id, d, d <-> '2016-05-16 14:21:25' FROM tsts ORDER BY d <-> '2016-05-16 14:21:25' LIMIT 5;
56-
52+
EXPLAIN (costs off)
53+
SELECT id, d, d <-> '2016-05-16 14:21:25' FROM tsts ORDER BY d <-> '2016-05-16 14:21:25' LIMIT 5;
54+
SELECT id, d, d <-> '2016-05-16 14:21:25' FROM tsts ORDER BY d <-> '2016-05-16 14:21:25' LIMIT 5;

0 commit comments

Comments
 (0)