neo4j - 密码 UNION 查询

标签 neo4j union cypher

我有以下简单的图表:
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 的结果集中累积在结果集中的所有数据执行另一个最终匹配子句?

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

谢谢。

最佳答案

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

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

关于neo4j - 密码 UNION 查询,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16018607/

相关文章:

neo4j - Neo4j 数据库、NestJS 框架和 GraphQL 如何集成?

neo4j - 获取每个关系深度的节点数

ubuntu - sudoers 是世界可写错误

neo4j - 有什么方法可以将节点返回的属性列入白名单或黑名单吗?

javascript - windows azure 中的 Neo4j 虚拟机

cassandra - 将两个结果集合并为一个

neo4j - 如果关系不存在则返回节点

mysql - ORDER BY 和 LIMIT 在使用 UNION 时不起作用

mysql - 为什么 UNION 查询在 MySQL 中这么慢?

neo4j - 如何批量插入关系