Skip to content

Commit

Permalink
Forgotten regression tests output for filters handling in indexes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Korotkov committed Feb 15, 2018
1 parent 8362a5e commit adc5fdf
Showing 1 changed file with 73 additions and 5 deletions.
78 changes: 73 additions & 5 deletions expected/jsquery.out
Original file line number Diff line number Diff line change
Expand Up @@ -2172,6 +2172,22 @@ SELECT gin_debug_query_path_value('$ = true');

(1 row)

SELECT gin_debug_query_path_value('$ . ? (review_votes > 10) . review_rating < 7');
gin_debug_query_path_value
--------------------------------
AND +
review_rating < 7 , entry 0 +
review_votes > 10 , entry 1 +

(1 row)

SELECT gin_debug_query_path_value('similar_product_ids . ? (# = "B0002W4TL2") . $');
gin_debug_query_path_value
-------------------------------------------------
similar_product_ids.# = "B0002W4TL2" , entry 0 +

(1 row)

SELECT gin_debug_query_value_path('NOT NOT NOT x(y(NOT (a=1) and NOT (b=2)) OR NOT NOT (c=3)) and z = 5');
gin_debug_query_value_path
----------------------------
Expand Down Expand Up @@ -2376,19 +2392,35 @@ SELECT gin_debug_query_value_path('*.@# ($ = 4 or $ = 2)');
(1 row)

SELECT gin_debug_query_value_path('tags.#.term. ? ( # = "NYC").x > 0');
gin_debug_query_value_path
------------------------------
tags.#.term.x > 0 , entry 0 +
gin_debug_query_value_path
----------------------------------
tags.#.term.# = "NYC" , entry 0 +

(1 row)

SELECT gin_debug_query_path_value('$ = true');
gin_debug_query_path_value
SELECT gin_debug_query_value_path('$ = true');
gin_debug_query_value_path
----------------------------
$ = true , entry 0 +

(1 row)

SELECT gin_debug_query_value_path('$ . ? (review_votes > 10) . review_rating < 7');
gin_debug_query_value_path
--------------------------------
AND +
review_rating < 7 , entry 0 +
review_votes > 10 , entry 1 +

(1 row)

SELECT gin_debug_query_value_path('similar_product_ids . ? (# = "B0002W4TL2") . $');
gin_debug_query_value_path
-------------------------------------------------
similar_product_ids.# = "B0002W4TL2" , entry 0 +

(1 row)

---table and index
select count(*) from test_jsquery where (v->>'review_helpful_votes')::int4 > 0;
count
Expand Down Expand Up @@ -2656,6 +2688,18 @@ select count(*) from test_jsquery where v @@ 'similar_product_ids.#';
1001
(1 row)

select count(*) from test_jsquery where v @@ '$ . ? (review_votes > 10) . review_rating < 7';
count
-------
79
(1 row)

select count(*) from test_jsquery where v @@ 'similar_product_ids . ? (# = "B0002W4TL2") . $';
count
-------
3
(1 row)

select v from test_jsquery where v @@ 'array <@ [2,3]' order by v;
v
-------------------
Expand Down Expand Up @@ -2922,6 +2966,18 @@ select count(*) from test_jsquery where v @@ 'similar_product_ids.#';
1001
(1 row)

select count(*) from test_jsquery where v @@ '$ . ? (review_votes > 10) . review_rating < 7';
count
-------
79
(1 row)

select count(*) from test_jsquery where v @@ 'similar_product_ids . ? (# = "B0002W4TL2") . $';
count
-------
3
(1 row)

explain (costs off) select v from test_jsquery where v @@ 'array <@ [2,3]' order by v;
QUERY PLAN
---------------------------------------------------------------
Expand Down Expand Up @@ -3233,6 +3289,18 @@ select count(*) from test_jsquery where v @@ 'similar_product_ids.#';
950
(1 row)

select count(*) from test_jsquery where v @@ '$ . ? (review_votes > 10) . review_rating < 7';
count
-------
79
(1 row)

select count(*) from test_jsquery where v @@ 'similar_product_ids . ? (# = "B0002W4TL2") . $';
count
-------
3
(1 row)

explain (costs off) select v from test_jsquery where v @@ 'array <@ [2,3]' order by v;
QUERY PLAN
---------------------------------------------------------------
Expand Down

0 comments on commit adc5fdf

Please sign in to comment.