You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cypher: only first case seems to be considered in subroutine when using UNION #3772
Sorry, last one for today! I have been trying to get one particular query working and working through the issues one by one.
# returns no results (wrong, neo4j returns success2 = 1)
WITH [] as toRemove
CALL {
WITH toRemove WITH toRemove
WHERE SIZE(toRemove) > 0
RETURN 2 AS success2
UNION
WITH toRemove WITH toRemove
WHERE SIZE(toRemove) = 0
RETURN 1 AS success2
}
RETURN success2
# returns success2 = 2 (correct)
WITH ["a"] as toRemove
CALL {
WITH toRemove WITH toRemove
WHERE SIZE(toRemove) > 0
RETURN 2 AS success2
UNION
WITH toRemove WITH toRemove
WHERE SIZE(toRemove) = 0
RETURN 1 AS success2
}
RETURN success2
Activity
fix: Cypher -> only first case seems to be considered in subroutine w…
lvca commentedon Apr 2, 2026
FIxed
Orkie commentedon Apr 2, 2026
Verified working, thanks!
fix: Cypher -> only first case seems to be considered in subroutine w…
fix: Cypher -> only first case seems to be considered in subroutine w…
fix: Cypher -> only first case seems to be considered in subroutine w…
fix: Cypher -> only first case seems to be considered in subroutine w…
fix: Cypher -> only first case seems to be considered in subroutine w…
chore(deps): bump the go-modules group across 1 directory with 3 upda…