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

Dropping an RDFGraph when there is a non-RDFGraph rel table leaves the rel table "dangling" #2752

Closed
semihsalihoglu-uw opened this issue Jan 31, 2024 · 1 comment
Assignees
Labels
bug Something isn't working high-priority rdf Issues related to RDF support

Comments

@semihsalihoglu-uw
Copy link
Contributor

Consider an RDFGraph UniKG and another node table Students and a rel table SameAs from Students to UniKG_r. You can drop UniKG even if that would leave Students around. Normally this would give a Binder exception that says: "Cannot delete node table nodeTableX referenced by rel table relTableY."

To replicate:

kuzu> CREATE RDF Graph UniKG;
kuzu> CREATE NODE TABLE Students(name STRING, primary key (name));
kuzu> CREATE REL TABLE SameStudent(FROM Students TO UniKG_r);
kuzu> DROP TABLE UniKG;
kuzu>  MATCH (a:Students)-[s:SameStudent]->(b) RETURN *;
Error: unordered_map::at: key not found

Normally, this would happen:

kuzu> CREATE NODE TABLE nodeTable1 (name STRING, primary key (name));
kuzu> CREATE NODE TABLE nodeTable2 (name STRING, primary key (name));
kuzu> CREATE REL TABLE relTable (FROM nodeTable1 TO nodeTable2);
kuzu> DROP TABLE nodeTable2;
Error: Binder exception: Cannot delete node table nodeTable2 referenced by rel table relTable.

So the system does not allow dropping nodeTable2.

@semihsalihoglu-uw semihsalihoglu-uw added bug Something isn't working high-priority rdf Issues related to RDF support labels Jan 31, 2024
@semihsalihoglu-uw semihsalihoglu-uw mentioned this issue Jan 31, 2024
24 tasks
@andyfengHKU
Copy link
Contributor

Fixed in PR #2760

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working high-priority rdf Issues related to RDF support
Projects
None yet
Development

No branches or pull requests

2 participants