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
openCypher: parallel lightweight edges share one identity, so relationship uniqueness drops paths over them and id(r) of a light edge throws #9573
Two lightweight edges of the same type between the same two vertices (two parallel light self loops included) have one identity, LightEdgeRID(type, out, in), and the openCypher row pipeline uses that identity for relationship uniqueness. It therefore treats them as one relationship: a path that walks one of them and then the other is dropped as if it reused a relationship.
Found while working on #9283: the count push-downs, which count adjacency entries, give the openCypher answer, and the row pipeline does not.
Repro:
CREATE VERTEX TYPE P; CREATE EDGE TYPE K;
-- a.newLightEdge("K", a); a.newLightEdge("K", a); a.newEdge("K", b)
MATCH (a:P)-[:K]-(b:P)-[:K]-(c:P) WHERE a <> c RETURN count(*) -- 4 (push-down, correct)
MATCH (a:P)-[:K]-(b:P)-[:K]-(c:P) WHERE a <> c WITH * RETURN count(*) -- 2 (pipeline)
Counted by hand with each edge a relationship of its own: from a, (loop1, a->b) and (loop2, a->b); from b, (a->b, loop1) and (a->b, loop2): 4. Without the inequality, the pipeline answers 2 where the answer is 6.
Related: id(r) on a lightweight edge fails, Cannot encode RID #4:-1 as a numeric id(): position -1 does not fit the 47 bits reserved for positions, so MATCH (a)-[r:K]-(b) RETURN id(r) cannot be run at all once a light edge is in the pattern.
Both come from a light edge having no position of its own. A fix needs an identity that tells two parallel light edges apart within a query (for instance the edge-list entry they come from) for uniqueness, and a defined answer for id() of a light edge (null, or a synthetic value), instead of an exception.
Two lightweight edges of the same type between the same two vertices (including parallel self loops) are now separate relationships for Cypher relationship uniqueness, so a path can walk one and then the other, but never the same one twice. id() of a lightweight edge now returns null instead of failing, since it has no record to encode. The docs (lightweight edges, id()) are updated.
❤️ Thanks for helping make ArcadeDB better! ArcadeDB is free and open source, sustained by its community. If it's useful to you or your company, please consider becoming a sponsor to keep development going.
Activity
review(#9573): light edge occurrence resolves on super-node stripes, …
review(#9542,#9573): labelled single node stays a pattern, comments o…
review(#9542,#9573): id() null only for lightweight edges, single-tri…
review(#9573): count(r) in the self-loop twin test
review(#9573): FINE log on the unresolved-occurrence fallback, stripe…
review(#9573): readFrom is package-private
Merge pull request #9588 from ArcadeData/worktree-arcadedb-9542-9573-…
lvca commentedon Oct 9, 2026
Fixed in #9588 (26.11.1).
Two lightweight edges of the same type between the same two vertices (including parallel self loops) are now separate relationships for Cypher relationship uniqueness, so a path can walk one and then the other, but never the same one twice.
id()of a lightweight edge now returnsnullinstead of failing, since it has no record to encode. The docs (lightweight edges,id()) are updated.❤️ Thanks for helping make ArcadeDB better! ArcadeDB is free and open source, sustained by its community. If it's useful to you or your company, please consider becoming a sponsor to keep development going.
fix(ArcadeData#9542,ArcadeData#9573): parenthesized Boolean variable …
fix(ArcadeData#9983): variable length, quantified and comprehension p…
fix(#9542,#9573): parenthesized Boolean variable in WHERE is not a no…
review(#9573): light edge occurrence resolves on super-node stripes, …
review(#9542,#9573): labelled single node stays a pattern, comments o…
review(#9542,#9573): id() null only for lightweight edges, single-tri…
review(#9573): count(r) in the self-loop twin test
review(#9573): FINE log on the unresolved-occurrence fallback, stripe…
review(#9573): readFrom is package-private
fix(#9983): variable length, quantified and comprehension patterns te…
fix(#12132): a lightweight edge has an element id of its own, so dele…