Mayil-AI-Sandbox / kuzudb_jan15

MIT License
0 stars 0 forks source link

Basic (s)-[p]->(o) query is not working when there is an RDFGraph in the db (hashtag2734) #45

Open vikramsubramanian opened 7 months ago

vikramsubramanian commented 7 months ago
kuzu> MATCH (s)-[p]->(o) RETURN count(*);
Error: Binder exception: Relationship pattern p with multiple rdf table labels is not supported.

We should be able to handle this.

)

mayil-ai[bot] commented 7 months ago

Summary: Error occurs when running a basic query with RDFGraph in the database.

Possible Solution

Based on the provided information, the issue seems to be related to the handling of relationship patterns with multiple RDF table labels in the query engine. The error message indicates that the system does not support such patterns. To resolve the issue, follow these steps:

Here is a potential code change in src/binder/bind/bind_graph_pattern.cpp:

if (!resourceTableIDs.empty()) {
    // Allow handling of multiple RDF table labels by implementing the required logic
    // For example, create a join operation across the multiple RDF tables
    // The following is a placeholder for the actual implementation
    auto joinOperation = createJoinOperationAcrossMultipleTables(resourceTableIDs);
    queryRel->setJoinOperation(std::move(joinOperation));
    // Rest of the code remains unchanged
}
return queryRel;

Please note that the above code snippet is a high-level example and does not contain the actual implementation details. The actual implementation would depend on the specific requirements and architecture of the Kùzu graph database.

Code snippets to check