remove redundant UNWIND
This commit is contained in:
parent
593ce552af
commit
45815f1eae
1 changed files with 5 additions and 5 deletions
|
|
@ -825,14 +825,14 @@ class MemgraphStorage(BaseGraphStorage):
|
||||||
END AS limited_nodes,
|
END AS limited_nodes,
|
||||||
size(all_nodes_unlimited) > $max_nodes AS is_truncated
|
size(all_nodes_unlimited) > $max_nodes AS is_truncated
|
||||||
|
|
||||||
UNWIND limited_nodes AS n1
|
UNWIND limited_nodes AS n
|
||||||
UNWIND limited_nodes AS n2
|
MATCH (n)-[r]-(m)
|
||||||
MATCH (n1)-[r]-(n2)
|
WHERE m IN limited_nodes
|
||||||
WITH DISTINCT r, limited_nodes, is_truncated
|
WITH collect(DISTINCT n) AS limited_nodes, collect(DISTINCT r) AS relationships, is_truncated
|
||||||
|
|
||||||
RETURN
|
RETURN
|
||||||
[node IN limited_nodes | {{node: node}}] AS node_info,
|
[node IN limited_nodes | {{node: node}}] AS node_info,
|
||||||
collect(DISTINCT r) AS relationships,
|
relationships,
|
||||||
is_truncated
|
is_truncated
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue