Mayil-AI-Sandbox / kuzudb_jan15

MIT License
0 stars 0 forks source link

`REL TABLE GROUP`: Error: Binder exception: Create rel with multiple rel labels or bound by multiple node labels is not supported. (hashtag2677) #54

Open vikramsubramanian opened 4 months ago

vikramsubramanian commented 4 months ago

Version: v0.1.0

REL TABLE GROUP seems not equivalent to separately defined RELs.

This errors:

CREATE NODE TABLE V1 (id STRING, PRIMARY KEY(id));
CREATE NODE TABLE V2 (id STRING, PRIMARY KEY (id));
CREATE NODE TABLE V3 (id STRING, PRIMARY KEY (id));
CREATE REL TABLE GROUP MYREL(FROM V3 TO V2, FROM V2 TO V1);

kuzu> CREATE (:V3 {id: "v3"})-[:MYREL]->(:V2 {id: "v2"})-[:MYREL]->(:V1 {id: "v1"});
Error: Binder exception: Create rel  with multiple rel labels or bound by multiple node labels is not supported.

This works:

CREATE NODE TABLE V1 (id STRING, PRIMARY KEY(id));
CREATE NODE TABLE V2 (id STRING, PRIMARY KEY (id));
CREATE NODE TABLE V3 (id STRING, PRIMARY KEY (id));
CREATE REL TABLE RELV2V1(FROM V2 TO V1);
CREATE REL TABLE RELV3V2(FROM V3 TO V2);
CREATE (:V3 {id: "v3"})-[:RELV3V2]->(:V2 {id: "v2"})-[:RELV2V1]->(:V1 {id: "v1"});

)

mayil-ai[bot] commented 4 months ago

Summary: Error occurs when using REL TABLE GROUP with multiple rel labels or bound by multiple node labels in Cypher.

Possible Solution

Based on the provided information, the issue seems to be related to the CREATE REL TABLE GROUP functionality, which does not support creating relationships with multiple labels or relationships that are bound by nodes with multiple labels. To resolve this issue, follow these steps:

Remember to follow the project's coding standards and guidelines for naming, error handling, and testing when making these changes.

Code snippets to check