Mayil-AI-Sandbox / kuzudb_jan15

MIT License
0 stars 0 forks source link

Update error message of mixing RDFGraph and regular Property graph table (hashtag2811) #19

Open vikramsubramanian opened 4 months ago

vikramsubramanian commented 4 months ago

If I query this on a database with an RDFGraph and regular relationship tables I get the following error message:

..> match (a)-[e]->(b) return *;
Error: Binder exception: Relationship pattern e contains both property graph relationship label st_to_r and RDFGraph label TurtleTest. Mixing two tables in the same relationship pattern is not supported.

Let's change the error message to: ... Mixing relationships tables from an RDFGraph and regular relationship tables in one pattern is currently not supported. )

mayil-ai[bot] commented 4 months ago

Summary: Error message for mixing RDFGraph and regular property graph tables needs to be updated.

Possible Solution

To address the issue described, you should update the error message in the code that throws the BinderException when a relationship pattern mixes RDFGraph and regular Property graph tables. Based on the provided snippets, the relevant code is likely in the file src/binder/bind/bind_graph_pattern.cpp.

The updated code snippet should look something like this:

if (!resourceTableIDs.empty()) {
    if (resourceTableIDs.size() > 1) {
        throw BinderException("Mixing relationships tables from an RDFGraph and regular relationship tables in one pattern is currently not supported.");
    }
    // ... rest of the code ...
}

Make sure to test the changes to confirm that the new error message is displayed when the exception is triggered.

Code snippets to check