Open vikramsubramanian opened 4 months ago
Summary: The issue involves avoidable binding errors with unresolved relationship tables, causing a mix of RDFGraph and regular property graph relationship tables.
Based on the provided information and code snippets, the issue seems to be related to the handling of relationship patterns in queries, particularly when involving RDFGraphs and property graphs. The error message indicates that the system does not support mixing two tables in the same relationship pattern, which is happening in the command match (a)-[e]->(b:TurtleTest_l) return *;
.
To resolve the issue, consider the following steps:
src/binder/bind/bind_graph_pattern.cpp
where the relationship patterns are bound and validated. Specifically, look at the bindQueryRel
function, which is responsible for binding relationship patterns in the query graph.bindQueryRel
function correctly distinguishes between RDFGraph relationships and property graph relationships, and that it does not allow a mix of both in the same pattern unless explicitly supported by the system.if (!resourceTableIDs.empty())
block, where the exception is thrown for multiple RDF table labels.test/ddl/e2e_ddl_test.cpp
to cover the scenario where a relationship pattern contains labels from both RDFGraph and property graphs, ensuring that the system behaves as expected after the changes.Remember to follow the project's coding standards and guidelines for contributing to the codebase when making changes.
src/binder/bind/bind_graph_pattern.cpp
This file contains logic related to binding graph patterns, which is directly related to the issue of relationship patterns containing mixed labels from RDFGraph and property graph tables.
I have a database with an RDFGraph TurtleTest, a regular node table Student, and a regular rel table st_r from student to TurtleTest_r resource node table. I get the following error:
I should not be getting this because the destination of e is TurtleTest_l, so e can only bind to TurtleTest_lt. So there is no real mixing of relationship tables from RDFGraph and regular property graph. We should not disable all multilabel queries because a database has an rdfgraph and a regular relationship table. We should only disable it when a relationship pattern resolves to mix these two types of relationship tables.
Here is a more basic example that we re disabling unlabeled or multilabel queries completely: I have a database with an RDFGraph TestTurtle, a regular node table student, and a regular rel table st_to_st from student to student.
So as long as there is a regular relationship in the database we give this error even though there is no relationship table between an RDFGraph's node table and a regular node table. )