Skip to content

SET allows labeling of path variables (openCypher violation) #1468

@zihaozeng0021

Description

@zihaozeng0021

Configuration

FalkorDB Version: falkordb/falkordb:latest (pulled 2025-12-15)

Operating System: WSL2 – Ubuntu 24.04.1 LTS

Installation Method: Docker


Steps to reproduce

  1. Start falkorDB via Docker
docker run --rm -p 6379:6379 falkordb/falkordb:latest
  1. Connect with redis-cli
redis-cli -h 127.0.0.1 -p 6379
  1. Run the following queries
GRAPH.DELETE g
GRAPH.QUERY g "CREATE (:X {k:10})-[:S {k:10}]->(:Y {k:10})"
GRAPH.QUERY g "MATCH p=(a:X {k:10})-[r:S {k:10}]->(b:Y {k:10}) SET p:L RETURN r"

Expected behaviour

The query should fail with a semantic/type error.

In Cypher Query Language Reference, Version 9

  • A label is a token that is assigned to nodes only. (See page 5)
  • The SET clause is used to update labels on nodes and properties on nodes and relationships. (See page 107)

p is a named path, so SET p:L is invalid and should be rejected during semantic analysis (e.g. “expected Node but was Path”).

Actual behaviour

The query executes successfully with no error and returns the relationship r.
The invalid SET p:L clause is silently accepted.


This repo is using Opire - what does it mean? 👇
💵 Everyone can add rewards for this issue commenting /reward 100 (replace 100 with the amount).
🕵️‍♂️ If someone starts working on this issue to earn the rewards, they can comment /try to let everyone know!
🙌 And when they open the PR, they can comment /claim #1468 either in the PR description or in a PR's comment.

🪙 Also, everyone can tip any user commenting /tip 20 @zihaozeng0021 (replace 20 with the amount, and @zihaozeng0021 with the user to tip).

📖 If you want to learn more, check out our documentation.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions