-
-
Couldn't load subscription status.
- Fork 79
Description
Discussed in #369
Originally posted by datanostra April 13, 2022
ArcadeDB version : 22.1.3
When I'm performing simple path finding Cypher queries, I would like to be able to return all objects present in the paths, but I can't
can't get my paths in the response.
This query returns an error:
MATCH path = (a:Transaction{id:'node_a'})-[r:IS_IN]-(b:City{id:'node_b'}) RETURN path
Caused by: java.lang.ClassCastException: class java.util.ArrayList cannot be cast to class java.util.Map (java.util.ArrayList and java.util.Map are in module java.base of loader 'bootstrap')
at com.arcadedb.gremlin.query.CypherQueryEngine.transformMap(CypherQueryEngine.java:91)
at org.apache.tinkerpop.gremlin.arcadedb.structure.ArcadeCypher.execute(ArcadeCypher.java:71)
at com.arcadedb.gremlin.query.CypherQueryEngine.command(CypherQueryEngine.java:66)
I have also tried to collect my objects:
MATCH path = (a:Transaction{id:'node_a'})-[r:IS_IN]-(b:City{id:'node_b'}) RETURN a,b,r
MATCH path = (a:Transaction{id:'node_a'})-[r:IS_IN]-(b:City{id:'node_b'}) RETURN nodes(path)
MATCH path = (a:Transaction{id:'node_a'})-[r:IS_IN]-(b:City{id:'node_b'}) RETURN [n in nodes(path) | n.id]
But all these queries return en empty result:
{"result":{"vertices":[],"records":[],"edges":[]},"user":"root","version":"22.1.3-SNAPSHOT (build d38e26aa6978b19d0d69999919b5c076fc994d37/1642118408201/main)"}
The only thing I can do for now is returning simple objects:
MATCH path = (a:Transaction{id:'node_a'})-[r:IS_IN]-(b:City{id:'node_b'}) RETURN a
MATCH path = (a:Transaction{id:'node_a'})-[r:IS_IN]-(b:City{id:'node_b'}) RETURN b
MATCH path = (a:Transaction{id:'node_a'})-[r:IS_IN]-(b:City{id:'node_b'}) RETURN r