Open vikramsubramanian opened 7 months ago
Summary: Error message incorrectly refers to the table in RDFGraph when setting object in an RDF Literal table.
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:
SET
clause within RDFGraph operations, particularly where it handles property setting for literals.TurtleTest_l
) is used when setting the property o.val
.set_rdf_graph_property
as hypothesized, review and correct the logic within this function to prevent incorrect table references.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.
src/binder/bind/bind_graph_pattern.cpp
This snippet is relevant because it contains logic related to binding RDF graph patterns, which is directly related to the issue of setting properties on RDFGraph tables.
src/binder/bind/copy/bind_copy_rdf_graph.cpp
This snippet is relevant as it deals with the binding process for copying RDF graphs, which may need to be reviewed to ensure proper error messages are generated when setting properties on RDFGraph tables.
src/binder/bind/ddl/bind_create_rdf_graph.cpp
This snippet is relevant because it includes code for binding the creation of RDF graphs, which might be involved in the process of setting properties and could be related to the error message issue.
third_party/antlr4_cypher/cypher_parser.cpp
This snippet is relevant as it contains the Cypher parser rules, which might need to be adjusted to provide better error messages when setting properties on RDFGraph tables.
I issued the following query:
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.
)