Closed mad closed 5 years ago
Example of graph
graph.traversal() .addV("Org").property("Name", "Org1").as("org") .addV("Person").property("Name", "Foo").as("p1") .addV("Person").property("Name", "Boo").as("p2") .addV("Person").property("Name", "Woo").as("p3") .addE("E").from("org").to("p1").property("e", true) .addE("E").from("org").to("p2").property("e", false) .addE("E").from("org").to("p3") .iterate();
Query 1:
MATCH (n:Org)-[r]-(p:Person) WHERE id(n) IN [{nID}] WITH p.Name as Name, CASE r.e WHEN true THEN 'Yes' WHEN false THEN 'No' ELSE r.e END AS Work RETURN Name, Work
Expected:
[{Name=Foo, Work=Yes}, {Name=Boo, Work=No}, {Name=Woo, Work=null}]
Actual:
[{Name=Foo, Work=Yes}, {Name=Boo, Work=No}]
Query 2:
MATCH (n:Org)-[r]-(p:Person) WHERE id(n) IN [{nID}] RETURN p.Name as Name, CASE r.e WHEN true THEN 'Yes' WHEN false THEN 'No' ELSE r.e END AS Work
Work is correct:
[{Name=Woo, Work=null}, {Name=Boo, Work=No}, {Name=Foo, Work=Yes}]
Fix pushed to tinkerpop334 as well.
tinkerpop334
Example of graph
Query 1:
Expected:
Actual:
Query 2:
Work is correct: