-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
Implement a generic BackendBackjumpingIterator, long overdue.
Let us consider the following query:
SELECT * WHERE {
?s p1 ?o .
?o p2 ?x .
?s p3 ?y }The join order is that of the query. Sometimes, ?s p3 ?y may fail, yet the engine enumerates all bindings of ?o p2 ?x. It would be better to backjump [1] directly to the first triple pattern since the variable ?s is a probable cause of failure.
In terms of implementation, this means:
- Throwing an exception in the
has_next()with the incriminated variable and let the iterator that actually sets the variable catch it, so it cannext()it accordingly. - For the sake of genericity, we must wrap each scan iterators into a backjump iterator that can throw, and make sure that every iterator properly forwards the exception.
This demonstrated remarkable performance improvements in compiled version of SPARQL queries, does this holds on the iterator/volcano model?
[1] R. J. Bayardo Jr., and D. P. Miranker. Processing Queries for First-Few Answers. In Proceedings of the fifth international conference on Information and knowledge management (1996).
Reactions are currently unavailable