Skip to content

Commit

Permalink
Fix unsorted output of some queries in the cypher_match test (#1507)
Browse files Browse the repository at this point in the history
Fix unsorted output of some queries in the cypher_match test
  • Loading branch information
saygoodbyye authored Feb 5, 2024
1 parent 972d193 commit c3f8caf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions regress/expected/cypher_match.out
Original file line number Diff line number Diff line change
Expand Up @@ -1998,13 +1998,13 @@ SELECT * FROM cypher('cypher_match', $$
(0 rows)

SELECT * FROM cypher('cypher_match', $$
MATCH (a)-[r]-(b) RETURN r $$) as (r agtype);
MATCH (a)-[r]-(b) RETURN r ORDER BY r DESC $$) as (r agtype);
r
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
{"id": 4785074604081153, "label": "knows", "end_id": 281474976710666, "start_id": 281474976710661, "properties": {"years": 3, "relationship": "friends"}}::edge
{"id": 4785074604081153, "label": "knows", "end_id": 281474976710666, "start_id": 281474976710661, "properties": {"years": 3, "relationship": "friends"}}::edge
{"id": 4785074604081154, "label": "knows", "end_id": 281474976710666, "start_id": 281474976710659, "properties": {"years": 4, "relationship": "enemies"}}::edge
{"id": 4785074604081154, "label": "knows", "end_id": 281474976710666, "start_id": 281474976710659, "properties": {"years": 4, "relationship": "enemies"}}::edge
{"id": 4785074604081153, "label": "knows", "end_id": 281474976710666, "start_id": 281474976710661, "properties": {"years": 3, "relationship": "friends"}}::edge
{"id": 4785074604081153, "label": "knows", "end_id": 281474976710666, "start_id": 281474976710661, "properties": {"years": 3, "relationship": "friends"}}::edge
{"id": 1407374883553283, "label": "e1", "end_id": 281474976710661, "start_id": 281474976710660, "properties": {}}::edge
{"id": 1407374883553283, "label": "e1", "end_id": 281474976710661, "start_id": 281474976710660, "properties": {}}::edge
(6 rows)
Expand Down Expand Up @@ -2091,13 +2091,13 @@ SELECT * FROM cypher('cypher_match', $$

-- check reuse of 'r' clause-to-clause - edges
SELECT * FROM cypher('cypher_match', $$
MATCH ()-[r]-() RETURN r $$) as (r agtype);
MATCH ()-[r]-() RETURN r ORDER BY r DESC $$) as (r agtype);
r
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
{"id": 4785074604081153, "label": "knows", "end_id": 281474976710666, "start_id": 281474976710661, "properties": {"years": 3, "relationship": "friends"}}::edge
{"id": 4785074604081153, "label": "knows", "end_id": 281474976710666, "start_id": 281474976710661, "properties": {"years": 3, "relationship": "friends"}}::edge
{"id": 4785074604081154, "label": "knows", "end_id": 281474976710666, "start_id": 281474976710659, "properties": {"years": 4, "relationship": "enemies"}}::edge
{"id": 4785074604081154, "label": "knows", "end_id": 281474976710666, "start_id": 281474976710659, "properties": {"years": 4, "relationship": "enemies"}}::edge
{"id": 4785074604081153, "label": "knows", "end_id": 281474976710666, "start_id": 281474976710661, "properties": {"years": 3, "relationship": "friends"}}::edge
{"id": 4785074604081153, "label": "knows", "end_id": 281474976710666, "start_id": 281474976710661, "properties": {"years": 3, "relationship": "friends"}}::edge
{"id": 1407374883553283, "label": "e1", "end_id": 281474976710661, "start_id": 281474976710660, "properties": {}}::edge
{"id": 1407374883553283, "label": "e1", "end_id": 281474976710661, "start_id": 281474976710660, "properties": {}}::edge
(6 rows)
Expand Down
4 changes: 2 additions & 2 deletions regress/sql/cypher_match.sql
Original file line number Diff line number Diff line change
Expand Up @@ -965,7 +965,7 @@ SELECT * FROM cypher('cypher_match', $$
MATCH (a),(b) WHERE a.age = 4 AND a.name = "orphan" AND b.age = 6 CREATE
(a)-[:knows {relationship: "enemies", years: 4}]->(b) $$) as (r agtype);
SELECT * FROM cypher('cypher_match', $$
MATCH (a)-[r]-(b) RETURN r $$) as (r agtype);
MATCH (a)-[r]-(b) RETURN r ORDER BY r DESC $$) as (r agtype);

-- check reuse of 'a' clause-to-clause - vertices
SELECT * FROM cypher('cypher_match', $$
Expand Down Expand Up @@ -996,7 +996,7 @@ SELECT * FROM cypher('cypher_match', $$

-- check reuse of 'r' clause-to-clause - edges
SELECT * FROM cypher('cypher_match', $$
MATCH ()-[r]-() RETURN r $$) as (r agtype);
MATCH ()-[r]-() RETURN r ORDER BY r DESC $$) as (r agtype);
SELECT * FROM cypher('cypher_match', $$
MATCH ()-[r]-() MATCH ()-[r {relationship: "friends"}]-() RETURN r $$) as (r agtype);
SELECT * FROM cypher('cypher_match', $$
Expand Down

0 comments on commit c3f8caf

Please sign in to comment.