aplbrain / aplbrain/grand-cypher

grandiso hints doesn't check _is_edge_attr_match and _is_node_attr_match.

未关闭
#84 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
bug
主要语言
Python
星标
129
派生
17
PR 合并指标
PR 指标待抓取

描述

As hints are given, grandiso skip `_is_edge_attr_match` and `_is_edge_attr_match`. In the following test case, the result should be either
x and for A and B or None and None for A and B, not x and z. This is due to the relation label `[r:XY]`.

```python
def test_hint():
host = nx.DiGraph()
host.add_node("x")
host.add_node("y")
host.add_node("z")
host.add_edge("x", "y", __labels__={"XY"}, name="XY")
host.add_edge("x", "z", __labels__={"XZ"}, name="XZ")

qry = """
MATCH (A) -[r:XY]-> (B)
RETURN ID(A), ID(B)
"""

res = GrandCypher(host).run(qry, hints=[{"A": "x", "B": "z"}])
assert res == {'ID(A)': ['x'], 'ID(B)': ['z']}
```

Is this the design in grandiso?

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。