
| Key: |
SES-589
|
| Type: |
Bug
|
| Status: |
Open
|
| Priority: |
Major
|
| Assignee: |
Unassigned
|
| Reporter: |
Enrico Minack
|
| Votes: |
0
|
| Watchers: |
0
|
|
If you were logged in you would be able to see more operations.
|
|
The LuceneSail test for GraphQuery's (org.openrdf.sail.lucene.LuceneSailTest.testGraphQuery()) succeeds with Sesame 2.0, but fails with the Sesame 2.1 branch due to the following problem:
The LuceneSail evaluates this query using the underlying sail:
Distinct
MultiProjection
ProjectionElemList
ProjectionElem "r" AS "subject"
ProjectionElem "-const-6" AS "predicate"
ProjectionElem "r2" AS "object"
ProjectionElemList
ProjectionElem "r" AS "subject"
ProjectionElem "-const-7" AS "predicate"
ProjectionElem "s" AS "object"
Extension
ExtensionElem (-const-6)
ValueConstant (value=urn:predicate3)
ExtensionElem (-const-7)
ValueConstant (value=http://www.openrdf.org/contrib/lucenesail#score)
Distinct
Projection
ProjectionElemList
ProjectionElem "r"
ProjectionElem "r2"
ProjectionElem "s"
Join
Join
Join
SingletonSet
SingletonSet
SingletonSet
StatementPattern
Var (name=r)
Var (name=-const-5, value=urn:predicate3, anonymous)
Var (name=r2)
The Statement pattern provides bindings for r2, whereas the values for r and s comes via the given binding set. In the end, the MultiProjection should generate statements out of the r2 and the given r and s. The bindings are
r=urn:subject3
s="0.8784157"^^http://www.w3.org/2001/XMLSchema#float
during
optimizerList.optimize(tupleExpr, dataset, bindings);
in the underlying sail (Memory or Native), the variable
Var (name=r)
is optimized to
Var (name=r, value=urn:subject3)
but since s is not in the tree, it is not injected into the tree. Then,
iter = strategy.evaluate(tupleExpr, EmptyBindingSet.getInstance());
is called, so that the given bindings are not further used for evaluation. This
is the reason why the s in
ProjectionElemList
ProjectionElem "r" AS "subject"
ProjectionElem "-const-7" AS "predicate"
ProjectionElem "s" AS "object"
gets not filled with the value given via the bindings.
changing
iter = strategy.evaluate(tupleExpr, EmptyBindingSet.getInstance());
to
iter = strategy.evaluate(tupleExpr, bindings);
lets the test pass and all sesame tests still succeed.
With this fix, LuceneSail can be set to use Sesame 2.1.
|
|
|
|