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

Querying relationship tables between regular node and RDF.Resource tables without node labels gives binding error. #2751

Closed
semihsalihoglu-uw opened this issue Jan 31, 2024 · 1 comment
Assignees
Labels
bug Something isn't working frontend Frontend, i.e., binder, parser, query planning-related issues high-priority rdf Issues related to RDF support

Comments

@semihsalihoglu-uw
Copy link
Contributor

I have an RDFGraph UniKG. It has a Resource with iri: "http://kuzu.io/rdf-ex#Adam". I add a new node table Students and a new relationship table between Students and UniKG_r (the resource node table). Then I get the following error:

kuzu> CREATE NODE TABLE Students(name STRING, primary key (name));
------------------------------------------
| result                                 |
------------------------------------------
| Node table: Students has been created. |
------------------------------------------
(1 tuple)
Time: 2.02ms (compiling), 31.61ms (executing)
kuzu> CREATE (s:Students {name: "Alice"});
-
(0 tuples)
Time: 0.28ms (compiling), 4.08ms (executing)
kuzu> CREATE (s:Students {name: "Adam"});
kuzu> CREATE REL TABLE SameStudent(FROM Students TO UniKG_r);
--------------------------------------------
| result                                   |
--------------------------------------------
| Rel table: SameStudent has been created. |
--------------------------------------------
kuzu> MATCH (a:Students {name: "Adam"}), (b:UniKG_r {iri: "http://kuzu.io/rdf-ex#Adam"})
..> CREATE (a)-[:SameStudent]->(b);
-
(0 tuples)
kuzu> MATCH ()-[s:SameStudent]->() RETURN *;
Error: Binder exception: Query node  violates schema. Expected labels are Students.

In the last query, if I instead query as follows it works:

kuzu> MATCH (a:Students)-[s:SameStudent]->(b) RETURN *;
----------------------------------------------------------------------------------------------------------------------------------------------------------
| a                                        | b                                                            | s                                            |
----------------------------------------------------------------------------------------------------------------------------------------------------------
| {_ID: 5:1, _LABEL: Students, name: Adam} | {_ID: 1:5, _LABEL: UniKG_r, iri: http://kuzu.io/rdf-ex#Adam} | (5:1)-{_LABEL: SameStudent, _ID: 6:0}->(1:5) |
----------------------------------------------------------------------------------------------------------------------------------------------------------
(1 tuple)
@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
@semihsalihoglu-uw semihsalihoglu-uw added the frontend Frontend, i.e., binder, parser, query planning-related issues label Jan 31, 2024
@andyfengHKU
Copy link
Contributor

Fixed in #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 frontend Frontend, i.e., binder, parser, query planning-related issues high-priority rdf Issues related to RDF support
Projects
None yet
Development

No branches or pull requests

2 participants