Given the graph created by:
CREATE ({v: 'src'})-[:E {v: 'edge'}]->({v: 'dest'})
The bidirectional conditional traversal works as expected:
redis-cli GRAPH.QUERY G "MATCH (a)-[e]-(b) RETURN a.v, e.v, b.v"
1) 1) "a.v"
2) "e.v"
3) "b.v"
2) 1) 1) "src"
2) "edge"
3) "dest"
2) 1) "dest"
2) "edge"
3) "src"
But the logical equivalent with an ExpandInto causes an error:
"MATCH (a), (b) WITH a, b MATCH (a)-[e]-(b) RETURN a.v, e.v, b.v"
1) 1) "a.v"
2) "e.v"
3) "b.v"
2) 1) 1) "src"
2) "edge"
3) "dest"
3) (error) Type mismatch: expected a map but was Unknown
Depending on how the referenced edge e is accessed (such as with RETURN e), this can also manifest as an assertion failure.
The issue here is that ExpandInto doesn't have logic equivalent to https://github.com/RedisGraph/RedisGraph/blob/master/src/execution_plan/ops/op_conditional_traverse.c#L152-L159 .
This can be solved within ExpandInto, but I think it would be preferable to make shared logic functions for CondTraverse and ExpandInto to both use.
Given the graph created by:
The bidirectional conditional traversal works as expected:
But the logical equivalent with an ExpandInto causes an error:
Depending on how the referenced edge
eis accessed (such as withRETURN e), this can also manifest as an assertion failure.The issue here is that ExpandInto doesn't have logic equivalent to https://github.com/RedisGraph/RedisGraph/blob/master/src/execution_plan/ops/op_conditional_traverse.c#L152-L159 .
This can be solved within ExpandInto, but I think it would be preferable to make shared logic functions for CondTraverse and ExpandInto to both use.