aplbrain / aplbrain/grand-cypher

Support for Equijoins

未關閉
#38 6 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
bug
主要語言
Python
星號
129
分支
17
PR 合併指標
30 天內沒有已合併 PR

描述

Hello, thank you for the great project :)

In how far are equijoins exactly supported?

Given that I have the following NetworkX graph:

```
G = nx.DiGraph()
G.add_node("x")
G.add_node("y")
G.add_node("z")
G.add_edge("x", "y")
G.add_edge("y", "x")
G.add_edge("x", "x")
G.add_edge("z", "x")
```

When I execute the following query:

```
MATCH (n)-->(n)
RETURN n
```

I get the result:

```
{Token('CNAME', 'n'): ['x', 'y']}
```

However, if I execute the same query on the equivalent graph in neo4j, I only get the node *x* as result - which to my understanding of Cypher would be the correct result.

Therefore, to my understanding, equijoins are currently only supported in the project when they are distributed over multiple `match` clauses and do not recognizes self cycles on nodes. Is that correct?

For instances, the following query correctly recognizes two loops in the graph:
```
MATCH (n)-->(m)
MATCH (m)-->(n)
RETURN n, m
```
While neo4j additionally returns n=x and m=x as a result.

Many regards,
Felix

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。