Open fanavarro opened 4 years ago
I am looking into it; on first glance it looks like its a bug in the code. In principle the approach should be exact for conjunctive queries (basic graph patterns + filters + projection); for other SPARQL operators a best effort approach is done by trying to enumerate all possible mappings of the two queries' normalized algebra expressions' leaf nodes (which were converted to conjunctive queries first), and then trying whether moving bottom-up can still map the variables/expressions of the intermediate nodes.
So the approach works bottom up based on mapping the leafs and then trying to map the variables / expressions intermediate operations while moving up. Conversely, it does not try to enumerate further equivalence transformations of a given algebra expression for performance reasons.
Hi, I need to check if two sparql queries are equivalent and I think this library is useful for that. Nonetheless, I am using the tryMatch function from
SparqlQueryContainmentUtils
class, and I am receiving the following exception:The queries that I would like to compare are the following:
As you can see, both queries are the same, but variables and statements are unsorted. My code to do that is the following:
I would like to know the limitations in the sparql operators that we can use with this library.
Thanks beforehand.