You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are no patterns matching OPTIONAL MATCH (n1 :L2)-[r0 *]-(n2 :L3), therefore n1 is always set to NULL.
For OPTIONAL MATCH (n3 :L1),(n1) to match anything, all pattern parts must match something. Since n1 is NULL, it can't ever match anything, therefore n3 is also always NULL.
To get your expected result, you need to break the second optional match into OPTIONAL MATCH (n3 :L1) OPTIONAL MATCH (n1).
There are no patterns matching OPTIONAL MATCH (n1 :L2)-[r0 *]-(n2 :L3), therefore n1 is always set to NULL.
For OPTIONAL MATCH (n3 :L1),(n1) to match anything, all pattern parts must match something. Since n1 is NULL, it can't ever match anything, therefore n3 is also always NULL.
To get your expected result, you need to break the second optional match into OPTIONAL MATCH (n3 :L1) OPTIONAL MATCH (n1).
Thank you! I found that the results returned by Neo4j and Memgraph are inconsistent, so I commit this issue on Memgraph Github (memgraph/memgraph#363).
I discovered that when I executed the following queries, only one record (1, null, null) is returned.
But it should return the three records as:
(1, false, null)
(1, null, null)
(1, true, null)
Neo4j Version: 4.3.10, 4.2.14 Community
Operating System: Windows 11
API: Cypher / Java API
Steps to reproduce
Expected behavior
Three records:
(1, false, null)
(1, null, null)
(1, true, null)
Actual behavior
One record:
(1, null, null)
The text was updated successfully, but these errors were encountered: