Mayil-AI-Sandbox / kuzudb_jan15

MIT License
0 stars 0 forks source link

Wrong error message when setting object in an RDF Literal table (hashtag2792) #25

Open vikramsubramanian opened 7 months ago

vikramsubramanian commented 7 months ago

I issued the following query:

kuzu> MATCH (a)-[p:TurtleTest_lt]->(o) 
WHERE p.iri = " 
SET o.val=cast(true, "BOOL") 
RETURN p.iri, o.val;  
Error: Binder exception: Cannot set property of o because it refers to table TurtleTest_r under rdf graph TurtleTest.

o must be in TurtleTest_l not TurtleTest_r.

So is it the case now that we cannot modify anything in RDFGraphs? First, I think we can allow them to set literals. I think that's fine. But if this is much easier, so we force them to delete and insert triples, then we should just give a better error message. Something like: Error: Binder exception: Cannot set properties of RDFGraph tables. You are trying to set o.val but o is part of table TurtleTest_l under RDFGraph TurtleTest.

Also Let's use the term RDFGraph instead of "rdf graph", which is what you have used in the error message.

)

mayil-ai[bot] commented 7 months ago

Summary: Error message incorrectly refers to the table in RDFGraph when setting object in an RDF Literal table.

Possible Solution

Based on the provided information, the issue seems to be related to an incorrect table reference in an RDFGraph operation within a query. The error message indicates that the property o.val cannot be set because it refers to the incorrect table TurtleTest_r instead of the correct table TurtleTest_l. To resolve this issue:

Please note that the provided code snippets do not directly contain the relevant code to fix the issue, so you will need to search the codebase for the appropriate files and functions that handle the SET clause and RDFGraph property setting.

Code snippets to check