Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong matching result on multiple labels #2672

Closed
ddaa2000 opened this issue Oct 28, 2022 · 2 comments · Fixed by #2711
Closed

Wrong matching result on multiple labels #2672

ddaa2000 opened this issue Oct 28, 2022 · 2 comments · Fixed by #2711
Labels

Comments

@ddaa2000
Copy link

Execute the following queries in RedisGraph 2.8.20

CREATE (n0 :L1)-[r1 :T0]->(n2)<-[r3 :T1]-(n4 :L2), (n2)<-[r4 :T2]-(n5 :L2)
MATCH (n0 :L2 :L1) RETURN * 

The correct result should be empty. However, RedisGraph returned the node with Label L1.
The CREATE query above can create the correct graph. If any of the the above n4 or n5 or the label of n0, n4, n5 is deleted in the CREATE query, the error would not be reproduced. It seems that RedisGraph puzzled when faced with multiple nodes with both L1 and L2.

@LiorKogan LiorKogan added the bug label Oct 28, 2022
@LiorKogan
Copy link
Member

@ddaa2000 thank you again!

@LiorKogan
Copy link
Member

Note the difference:

GRAPH.QUERY q "MATCH (n0:L2:L1) RETURN *"
1) 1) "n0"
2) 1) 1) 1) 1) "id"
            2) (integer) 0
         2) 1) "labels"
            2) 1) "L1"
         3) 1) "properties"
            2) (empty array)
3) 1) "Cached execution: 1"
   2) "Query internal execution time: 1.465200 milliseconds"
GRAPH.QUERY q "MATCH (n0:L1:L2) RETURN *"
1) 1) "n0"
2) (empty array)
3) 1) "Cached execution: 1"
   2) "Query internal execution time: 0.609800 milliseconds"

@raz-mon raz-mon linked a pull request Nov 16, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants