Skip to content

grandiso hints doesn't check _is_edge_attr_match and _is_node_attr_match. #84

@khoale88

Description

@khoale88

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].

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions