I have a query which supposes to join two results and give the union as output.
MATCH (:Some )-[r*0..1]-> (p:Address) WITH collect(p) AS rows1
MATCH (:Some2)-[r*0..1]-> (pp:Address)
WITH rows1+collect(pp) AS rows2
UNWIND rows2 AS row RETURN row
As you can see the selection has two parts. So it works fine if there is matching data for both queries but if the second part of the match does not return anything then it returns empty. Meaning MATCH (:Some2)-[r*0..1]-> (pp:Address) returns empty then the whole union fails and returns null even if MATCH (:Some )-[r*0..1]-> (p:Address) return values .
How to fix this? Is it a bug in neo4j?