Skip to content
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

Src and dest node are not shown properly for non-directional matches: (a)-[r]-(b) #3166

Closed
lbuczkow opened this issue Mar 28, 2024 · 1 comment
Assignees

Comments

@lbuczkow
Copy link

Given the following queries:

MATCH (n0:Note {id: 11})-[r:Links]->(n:Note {id:12}) RETURN ID(n0), r, ID(n);
-------------------------------------------------------------------------------
| n0._ID   | r                                                     | n._ID    |
-------------------------------------------------------------------------------
| 1:435121 | (1:435121)-{_LABEL: Links, _ID: 2:841305}->(1:435122) | 1:435122 |
-------------------------------------------------------------------------------

MATCH (n0:Note {id: 11})<-[r:Links]-(n:Note {id:12}) RETURN ID(n0), r, ID(n);
-------------------------------------------------------------------------------
| n0._ID   | r                                                     | n._ID    |
-------------------------------------------------------------------------------
| 1:435121 | (1:435122)-{_LABEL: Links, _ID: 2:841307}->(1:435121) | 1:435122 |
-------------------------------------------------------------------------------

MATCH (n0:Note {id: 11})-[r:Links]-(n:Note {id:12}) RETURN ID(n0), r, ID(n);
-------------------------------------------------------------------------------
| n0._ID   | r                                                     | n._ID    |
-------------------------------------------------------------------------------
| 1:435121 | (1:435121)-{_LABEL: Links, _ID: 2:841305}->(1:435122) | 1:435122 |
-------------------------------------------------------------------------------
| 1:435121 | (1:435121)-{_LABEL: Links, _ID: 2:841307}->(1:435122) | 1:435122 |
-------------------------------------------------------------------------------

The third query result is shown wrong. The IDs should be exchanged in the 2nd row.

Similarly, path is shown wrong too:

MATCH p=(n0:Note {id: 11})-[r:Links]-(n:Note {id:12}) RETURN properties(nodes(p), '_ID'), ID(n0), ID(n);
--------------------------------------------------
| PROPERTIES(NODES(p),_ID) | n0._ID   | n._ID    |
--------------------------------------------------
| [1:435121,1:435122]      | 1:435121 | 1:435122 |
| [1:435121,1:435122]      | 1:435121 | 1:435122 |
--------------------------------------------------
@andyfengHKU
Copy link
Contributor

This should now be fixed in #3404

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants