Skip to content

Commit fb01e61

Browse files
jrgemignaniEgor Chindyaskin
andauthored
Fix unsorted output of some queries in the cypher_match test (#1507) (#1602)
Fix unsorted output of some queries in the cypher_match test Co-authored-by: Egor Chindyaskin <e.chindyaskin@postgrespro.ru>
1 parent dc36dcc commit fb01e61

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

regress/expected/cypher_match.out

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1998,13 +1998,13 @@ SELECT * FROM cypher('cypher_match', $$
19981998
(0 rows)
19991999

20002000
SELECT * FROM cypher('cypher_match', $$
2001-
MATCH (a)-[r]-(b) RETURN r $$) as (r agtype);
2001+
MATCH (a)-[r]-(b) RETURN r ORDER BY r DESC $$) as (r agtype);
20022002
r
20032003
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
2004-
{"id": 4785074604081153, "label": "knows", "end_id": 281474976710666, "start_id": 281474976710661, "properties": {"years": 3, "relationship": "friends"}}::edge
2005-
{"id": 4785074604081153, "label": "knows", "end_id": 281474976710666, "start_id": 281474976710661, "properties": {"years": 3, "relationship": "friends"}}::edge
20062004
{"id": 4785074604081154, "label": "knows", "end_id": 281474976710666, "start_id": 281474976710659, "properties": {"years": 4, "relationship": "enemies"}}::edge
20072005
{"id": 4785074604081154, "label": "knows", "end_id": 281474976710666, "start_id": 281474976710659, "properties": {"years": 4, "relationship": "enemies"}}::edge
2006+
{"id": 4785074604081153, "label": "knows", "end_id": 281474976710666, "start_id": 281474976710661, "properties": {"years": 3, "relationship": "friends"}}::edge
2007+
{"id": 4785074604081153, "label": "knows", "end_id": 281474976710666, "start_id": 281474976710661, "properties": {"years": 3, "relationship": "friends"}}::edge
20082008
{"id": 1407374883553283, "label": "e1", "end_id": 281474976710661, "start_id": 281474976710660, "properties": {}}::edge
20092009
{"id": 1407374883553283, "label": "e1", "end_id": 281474976710661, "start_id": 281474976710660, "properties": {}}::edge
20102010
(6 rows)
@@ -2091,13 +2091,13 @@ SELECT * FROM cypher('cypher_match', $$
20912091

20922092
-- check reuse of 'r' clause-to-clause - edges
20932093
SELECT * FROM cypher('cypher_match', $$
2094-
MATCH ()-[r]-() RETURN r $$) as (r agtype);
2094+
MATCH ()-[r]-() RETURN r ORDER BY r DESC $$) as (r agtype);
20952095
r
20962096
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
2097-
{"id": 4785074604081153, "label": "knows", "end_id": 281474976710666, "start_id": 281474976710661, "properties": {"years": 3, "relationship": "friends"}}::edge
2098-
{"id": 4785074604081153, "label": "knows", "end_id": 281474976710666, "start_id": 281474976710661, "properties": {"years": 3, "relationship": "friends"}}::edge
20992097
{"id": 4785074604081154, "label": "knows", "end_id": 281474976710666, "start_id": 281474976710659, "properties": {"years": 4, "relationship": "enemies"}}::edge
21002098
{"id": 4785074604081154, "label": "knows", "end_id": 281474976710666, "start_id": 281474976710659, "properties": {"years": 4, "relationship": "enemies"}}::edge
2099+
{"id": 4785074604081153, "label": "knows", "end_id": 281474976710666, "start_id": 281474976710661, "properties": {"years": 3, "relationship": "friends"}}::edge
2100+
{"id": 4785074604081153, "label": "knows", "end_id": 281474976710666, "start_id": 281474976710661, "properties": {"years": 3, "relationship": "friends"}}::edge
21012101
{"id": 1407374883553283, "label": "e1", "end_id": 281474976710661, "start_id": 281474976710660, "properties": {}}::edge
21022102
{"id": 1407374883553283, "label": "e1", "end_id": 281474976710661, "start_id": 281474976710660, "properties": {}}::edge
21032103
(6 rows)

regress/sql/cypher_match.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -965,7 +965,7 @@ SELECT * FROM cypher('cypher_match', $$
965965
MATCH (a),(b) WHERE a.age = 4 AND a.name = "orphan" AND b.age = 6 CREATE
966966
(a)-[:knows {relationship: "enemies", years: 4}]->(b) $$) as (r agtype);
967967
SELECT * FROM cypher('cypher_match', $$
968-
MATCH (a)-[r]-(b) RETURN r $$) as (r agtype);
968+
MATCH (a)-[r]-(b) RETURN r ORDER BY r DESC $$) as (r agtype);
969969

970970
-- check reuse of 'a' clause-to-clause - vertices
971971
SELECT * FROM cypher('cypher_match', $$
@@ -996,7 +996,7 @@ SELECT * FROM cypher('cypher_match', $$
996996

997997
-- check reuse of 'r' clause-to-clause - edges
998998
SELECT * FROM cypher('cypher_match', $$
999-
MATCH ()-[r]-() RETURN r $$) as (r agtype);
999+
MATCH ()-[r]-() RETURN r ORDER BY r DESC $$) as (r agtype);
10001000
SELECT * FROM cypher('cypher_match', $$
10011001
MATCH ()-[r]-() MATCH ()-[r {relationship: "friends"}]-() RETURN r $$) as (r agtype);
10021002
SELECT * FROM cypher('cypher_match', $$

0 commit comments

Comments
 (0)