2

我有一个简单的下图:
http ://console.neo4j.org/?id=v0cvwn

我想知道为什么下面的查询:

 START n=node(2) 
 match n-[:KNOWS]-node 
 return node.name as name 
 UNION 
 START n=node(2) 
 match n-[:ACTS_IN]-node 
 return node.name as name

抛出异常:

java.lang.AssertionError: assertion failed: Can't profile the same pipe twice
at scala.Predef$.assert(Predef.scala:179)
at org.neo4j.cypher.internal.profiler.Profiler.decorate(Profiler.scala:47)
at org.neo4j.cypher.internal.pipes.Pipe$class.createResults(Pipe.scala:35)
at org.neo4j.cypher.internal.pipes.NullPipe$.createResults(Pipe.scala:47)
at org.neo4j.cypher.internal.pipes.PipeWithSource.createResults(Pipe.scala:61)
at org.neo4j.cypher.internal.pipes.PipeWithSource.createResults(Pipe.scala:61)
at org.neo4j.cypher.internal.pipes.PipeWithSource.createResults(Pipe.scala:61)
at org.neo4j.cypher.internal.pipes.UnionIterator.loadNextIterator$1(UnionIterator.scala:60)
at org.neo4j.cypher.internal.pipes.UnionIterator.step$1(UnionIterator.scala:68)
at org.neo4j.cypher.internal.pipes.UnionIterator.stepIfNeccessary(UnionIterato

关于 UNION 的几个问题:

作为先前子查询中 UNION 的结果,是否可以对结果集中累积的所有数据执行另一个最终匹配子句?

是否可以根据该数据执行订单?

谢谢。

4

1 回答 1

2

根据这些 github 评论,UNION仅支持 2.0 或更高版本。

https://github.com/neo4j/neo4j/issues/125

于 2013-04-19T16:26:35.520 回答