kuzudb / explorer

Browser-based user interface for Kùzu graph database
https://hub.docker.com/r/kuzudb/explorer
MIT License
29 stars 4 forks source link

Explorer not displaying the recursive relationship correctly #158

Closed semihsalihoglu-uw closed 1 day ago

semihsalihoglu-uw commented 2 weeks ago

I'm running this query both in KuzuExplorer (latest, see screenshot) and CLI (0.4.2). Explorer does not seem to draw the output recursive rel as expected. Here's the query:

MATCH (p1:Person)-[o1:Owns]->(a1:Account)-[r:Transfer* SHORTEST]-(a2:Account)<-[o2:Owns]-(p2:Person) 
WHERE p1.email = "georodaw366@hotmail.com" AND p2.email = "ezimmerman@yahoo.com" 
RETURN *;

The output is as follows on the shell and contains 3 internal edges that bind to r:

Screen Shot 2024-07-04 at 4 33 11 PM

However the output on Explorer shows only 1 edge (the middle edge). The other two edges are not drawn:

Screen Shot 2024-07-04 at 4 34 10 PM

The table view of Explorer seems to have the correct output with 3 edges:

Screen Shot 2024-07-04 at 4 35 43 PM

You can replicate by cloning the datasets and graph here: https://github.com/kuzudb/cypher-workshop/tree/main (except I made 2 changes to the datasets: 1) Removed the last transfer in transfer.csv "5,8,257,47231669"; and 2) changed the address of "+10,Rhea,"1919 Joshua Square Suite 643, Carmen Town, WY 83111",WY,83111,rh2schultz@gmail.com" so that Rhea lives in the same address as George (georodaw366@hotmail.com). This creates a second 5-length path between George and Edward (ezimmerman@yahoo.com).

Screen Shot 2024-07-04 at 4 29 50 PM
mewim commented 2 weeks ago

There are two issues.

  1. The kernel seems to return edges in both directions, which @andyfengHKU will address.
  2. Explorer is handling multiple edges between nodes incorrectly. It should not draw these edges with overlaps. I am working on fixing it.

Also, it might be nice to add a feature to trace/highlight each path returned from recursive query. I will create a new issue for this.

mewim commented 2 weeks ago

Overlapping edge handling has been addressed in #164.

Screenshot 2024-07-05 at 11 22 57 AM
mewim commented 1 week ago

This is fixed with the latest nightly build 0.4.3-dev.47 and dev version of Explorer:

Screenshot 2024-07-06 at 9 13 33 PM