Closed sedirmohammed closed 3 years ago
Hi @adler4566
The problem here is that you are returning an array, that is not a vertex.
You can try the following, that probably will solve the issue:
...
cmd += "LET $result = SELECT unionAll($a, $b);";
cmd += "return $result;";
Thanks
Luigi
Hey @luigidellaquila ,
thank you for your approach, but it doesn't help. The GremlinPipeLine
object returns nothing. If I turn on the debugger to illustrate the structure of the orientDynaElementIterableBatch
object it shows me the following:
Do you have an idea for this problem?
Kind regards Sedir Mohammed
OrientDB Version: 2.2.35
Java Version: 1.8
Hello, my current situation is the following: I searching over the
graph.command()
command with sql a specific vertex and from this vertex i traverse over all outgoing edges, using theGremlinPipeline
. Now I tried to use a SQL Batch query, but from here I don't know how I can get the returned objects to but them into theGremlinpipeline
. So this is my approach without the batch query:The confusing here is that the
orientDynaElementIterable
object contains anODocument
object, but I first thought theGremlinPipeline
needsVertex
objects. But for whatever reason it works and returnsVertex
objects. Maybe it does an other query in the background to get aVertex
object?An this is my approach with the batch query:
Here I get the following exception:
Exception in thread "main" java.lang.ClassCastException: com.orientechnologies.orient.core.db.record.ORecordLazyList cannot be cast to com.tinkerpop.blueprints.Vertex at com.tinkerpop.pipes.transform.VertexQueryPipe.processNextStart(VertexQueryPipe.java:85) at com.tinkerpop.pipes.transform.VertexQueryPipe.processNextStart(VertexQueryPipe.java:19) at com.tinkerpop.pipes.AbstractPipe.next(AbstractPipe.java:89) at com.tinkerpop.pipes.util.Pipeline.next(Pipeline.java:115) at com.tinkerpop.pipes.util.PipeHelper.fillCollection(PipeHelper.java:52) at com.tinkerpop.gremlin.java.GremlinPipeline.toList(GremlinPipeline.java:1564) at App.main(App.java:97)
So I don't understand the connection between the
OrientDynaElementIterable
object and theGremlinPipeline
, or is it not provided to to start aGremlinPipeline
after a batch?Kind regards