OpenCypher limitation? Referencing properties of existing nodes during CREATE

I create a couple of simple graphs:> GRAPH.QUERY test “CREATE (:T1 {name: ‘Node A’})-[:R1]->(:T2 {name: ‘Node B’, prop1: ‘XYZ’})-[:R2]->(:T3 {name: ‘Node C’})”

  1. (empty list or set)

    1. “Labels added: 3”
  2. “Nodes created: 3”

  3. “Properties set: 4”

  4. “Relationships created: 2”

  5. “Query internal execution time: 2.923728 milliseconds”> GRAPH.QUERY test “CREATE (:T1 {name: ‘Node D’})-[:R1]->(:T2 {name: ‘Node E’, prop1: ‘123’})-[:R2]->(:T3 {name: ‘Node F’})”

  1. (empty list or set)

    1. “Nodes created: 3”
  2. “Properties set: 4”

  3. “Relationships created: 2”

  4. “Query internal execution time: 0.397805 milliseconds”

I then attempt to create a new relationship linking nodes of type T1 (l) and T3 (n) using a property taken from T2 (m) to assign to the new relationship (R3):> GRAPH.QUERY test “MATCH (l:T1)-[:R1]->(m:T2)-[:R2]->(n:T3) CREATE (l)-[:R3 {prop1: m.prop1}]->(n)”

(error) Syntax error at offset 67 near ‘m’

but this fails with a Syntax error - this works in neo4j

Such a query works fine with if no property or a fixed property (ie. no reference to existing nodes) is used:> GRAPH.QUERY test “MATCH (l:T1)-[:R1]->(m:T2)-[:R2]->(n:T3) CREATE (l)-[:R3]->(n)”

  1. (empty list or set)

    1. “Relationships created: 2”
  2. “Query internal execution time: 0.388876 milliseconds”

Is this a limitation with the current redisgraph opencypher implementation?



The current implementation allows you to specify constants for property values,
We ought to change that to support more “expressive” type of values.