Menu

#110 SPARQL OPTIONAL not handled correctly

0.5.5.5
closed
nobody
None
5
2009-07-12
2008-12-16
No

The OPTIONAL clause is not handled correctly by the query execution engine. According to the sparql recommendation http://www.w3.org/TR/rdf-sparql-query/#sparqlAlgebra, an optional should be evaluated as follows: LeftJoin(Ω1, Ω2, expr) = Filter(expr, Join(Ω1, Ω2)) set-union Diff(Ω1, Ω2, expr).

So, if the rhs of the optional is a filter, the boolean expression in the filter should be pushed out and its evaluation should be delayed until the natural join is evaluated. Currently the operands of the optional are evaluated separeted and then a left outer join is done on the two results, not the same semantics as the sparql recommendation.

Proposed solution involves changing left outer join engine to include a boolean expression (from the filter clause), which is only evaluated after join is done.

Discussion

  • Andrew Newman

    Andrew Newman - 2009-07-12
    • status: open --> closed
     
  • Andrew Newman

    Andrew Newman - 2009-07-12
    • milestone: 800749 --> 0.5.5.5
     

Log in to post a comment.

MongoDB Logo MongoDB