Skip to content

Conversation

@jrgemignani
Copy link
Contributor

NOTE: This PR was built with AI tools and verified by a human.

Implements Cypher SET and REMOVE operations for vertex labels in the unified vertex table architecture. This allows dynamic label management on vertices.

SET n:Label

  • Only works on vertices with no label.

  • Auto-creates the label if it doesn't exist.

  • Errors with hint if vertex already has a label: "Multiple labels are not supported. Use REMOVE to clear the label first."

REMOVE n:Label

  • Removes a vertex's specified label.

  • Properties are preserved

  • No-op if vertex already has no label

Added regression tests.

modified: regress/expected/cypher_remove.out
modified: regress/expected/unified_vertex_table.out
modified: regress/sql/unified_vertex_table.sql
modified: src/backend/executor/cypher_set.c
modified: src/backend/nodes/cypher_copyfuncs.c
modified: src/backend/nodes/cypher_outfuncs.c
modified: src/backend/nodes/cypher_readfuncs.c
modified: src/backend/parser/cypher_clause.c
modified: src/backend/parser/cypher_gram.y
modified: src/include/nodes/cypher_nodes.h

NOTE: This PR was built with AI tools and verified by a human.

Implements Cypher SET and REMOVE operations for vertex labels in the unified
vertex table architecture. This allows dynamic label management on vertices.

SET n:Label

* Only works on vertices with no label.

* Auto-creates the label if it doesn't exist.

* Errors with hint if vertex already has a label:
"Multiple labels are not supported. Use REMOVE to clear the label first."

REMOVE n:Label

* Removes a vertex's specified label.

* Properties are preserved

* No-op if vertex already has no label

Added regression tests.

modified:   regress/expected/cypher_remove.out
modified:   regress/expected/unified_vertex_table.out
modified:   regress/sql/unified_vertex_table.sql
modified:   src/backend/executor/cypher_set.c
modified:   src/backend/nodes/cypher_copyfuncs.c
modified:   src/backend/nodes/cypher_outfuncs.c
modified:   src/backend/nodes/cypher_readfuncs.c
modified:   src/backend/parser/cypher_clause.c
modified:   src/backend/parser/cypher_gram.y
modified:   src/include/nodes/cypher_nodes.h
@github-actions github-actions bot added the override-stale To keep issues/PRs untouched from stale action label Dec 20, 2025
@jrgemignani jrgemignani reopened this Dec 20, 2025
@jrgemignani jrgemignani merged commit 75ce99f into apache:Dev_Multiple_Labels Dec 20, 2025
13 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

override-stale To keep issues/PRs untouched from stale action

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant