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 dynamic labels: SET n:$(expr) creates a literal vertex type named '$(expr)' #7059
Neo4j 5 dynamic label syntax — SET n:$(expression) — is not interpolated. ArcadeDB instead creates a vertex type whose name is the literal text $(node.labels), and attaches it to the affected nodes.
No error is raised at write time. It surfaces later, when a client reads those nodes back and finds an invalid label.
with $nodes = [{uuid: 'a', labels: 'Finding', name: 'x'}, ...]
Result
SELECT name FROM schema:types
-- '$(node.labels)', '$(node.labels)~Entity', 'Entity', 'Entity~Finding', ...
MATCH (n:Entity) RETURNDISTINCTlabels(n) ASl, count(*) ASc--{'l': ['$(node.labels)','Entity'],'c':4}
Four nodes carry $(node.labels) as an actual label, and two junk types are now in the schema.
Expected
Either the expression is evaluated and the intended label applied, or the statement is rejected as unsupported syntax. Silently creating a type named after the uninterpolated expression is the worst of the three outcomes — it corrupts the schema and the data without surfacing anything.
Impact
This is the query graphiti emits for bulk node saves (node_db_queries.py:263). Ingesting one episode appears to succeed; the next episode's deduplication reads those nodes back, rejects the label, and the pipeline stops. Any Neo4j-compatible client using dynamic labels will hit the same thing.
The Neo4j 5 dynamic-label syntax SET n:$(expression) parsed, but the expression was never interpolated: the clause flattened the whole label subtree to its source text, so a vertex type literally named $(node.labels) was created and attached to your nodes, with no error at write time. REMOVE n:$(expression) had the mirror-image defect and silently did nothing. Both clauses now evaluate the expression per row and use the value it yields, accepting a string or a list of strings and rejecting anything that cannot be a type name instead of converting it into one. Two long-standing gaps in the same code went with it: REMOVE n IS Label was unimplemented, and a variable read only through a label expression could be dropped from the query plan.
❤️ 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
fix(#7059): give REMOVE the same simultaneous-assignment semantics as…
fix(#7059): interpolate Cypher dynamic labels instead of naming a typ…
robfrank commentedon Sep 3, 2026
Fixed in #7081, merged to
main.The Neo4j 5 dynamic-label syntax
SET n:$(expression)parsed, but the expression was never interpolated: the clause flattened the whole label subtree to its source text, so a vertex type literally named$(node.labels)was created and attached to your nodes, with no error at write time.REMOVE n:$(expression)had the mirror-image defect and silently did nothing. Both clauses now evaluate the expression per row and use the value it yields, accepting a string or a list of strings and rejecting anything that cannot be a type name instead of converting it into one. Two long-standing gaps in the same code went with it:REMOVE n IS Labelwas unimplemented, and a variable read only through a label expression could be dropped from the query plan.❤️ 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#7096): run every SQL write statement in one implicit t…
fix: close three test-coverage gaps and cover the literal dynamic SET…