Dimitrianos Savva
2016-12-11 22:02:59 UTC
Hi all,
I try to build a new type of dataset which will be very similar to the âin memoryâ dataset.
I am new to Jena and trying to understand how the query engine evaluates a query and what optimizations are performed.
While looking at ReorderFixed class (org.apache.jena.sparql.engine.optimizer.reorder.ReorderFixed), I noticed that there are some predefined patterns to decide the weight of a given triple pattern and then do some reordering according to the weights.
At line 89 I noticed the following line of code which seems wrong. (see init() function)
matcher.addPattern(new Pattern(2, TERM, TERM, TERM)) ; // S?O
I was expecting TERM, VAR, TERM instead of TERM, TERM, TERM because itâs the only generic pattern that is missing there
Moreover the comment // S?O is a hint that the pattern should be âvariable as the predicate of a triple patternâ.
Is that correct?
Regards,
Dimis
I try to build a new type of dataset which will be very similar to the âin memoryâ dataset.
I am new to Jena and trying to understand how the query engine evaluates a query and what optimizations are performed.
While looking at ReorderFixed class (org.apache.jena.sparql.engine.optimizer.reorder.ReorderFixed), I noticed that there are some predefined patterns to decide the weight of a given triple pattern and then do some reordering according to the weights.
At line 89 I noticed the following line of code which seems wrong. (see init() function)
matcher.addPattern(new Pattern(2, TERM, TERM, TERM)) ; // S?O
I was expecting TERM, VAR, TERM instead of TERM, TERM, TERM because itâs the only generic pattern that is missing there
Moreover the comment // S?O is a hint that the pattern should be âvariable as the predicate of a triple patternâ.
Is that correct?
Regards,
Dimis