History | Log In     View a printable version of the current page. Get help!  
Issue Details [XML]

Key: SES-694
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Olaf Goerlitz
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Sesame

FilterOptimizer is broken (ineffective) for new N-ary join operators of Sesame 3.0

Created: 15/Dec/09 04:47 PM   Updated: 16/Dec/09 11:25 AM
Component/s: Query Optimizer
Affects Version/s: 3.0
Fix Version/s: 3.0


 Description   
The transition from binary to n-ary join operators in Sesame 3.0 was not adapted in the logic of org.openrdf.query.algebra.evaluation.impl.FilterOptimizer.

For example, the query
SELECT *
WHERE {
    ?document dc:creator ?erdoes.
    ?document dc:creator ?author.
    ?author foaf:name ?name
    FILTER (?author!=?erdoes)
  }

will give following operator tree:

            Filter
               Compare (!=)
                  Var (name=author)
                  Var (name=erdoes)
               Join
                  StatementPattern
                     Var (name=document)
                     Var (name=-const-10, value=http://purl.org/dc/elements/1.1/creator, anonymous)
                     Var (name=erdoes)
                  StatementPattern
                     Var (name=document)
                     Var (name=-const-11, value=http://purl.org/dc/elements/1.1/creator, anonymous)
                     Var (name=author)
                  StatementPattern
                     Var (name=author)
                     Var (name=-const-12, value=http://xmlns.com/foaf/0.1/name, anonymous)
                     Var (name=name)

The FilterOptimizer will not further improve this since it only checks if a contained tuple expression satisfies *all* filter expressions with its bindings. It does not consider that the first two statement patterns in combination do actually provide all the bindings names for the filter. However, with the binary join in Sesame 2.2 this optimization was possible.

I don't know if other optimizers are affected as well.


 All   Comments   Change History      Sort Order:
Comment by Arjohn Kampman [15/Dec/09 07:31 PM]
I assume that you mean Sesame 3.0 instead of 2.3?

Comment by Olaf Goerlitz [16/Dec/09 10:40 AM]
Sorry, my mistake (first time diving into the source code). I'm working on the current trunk version. So it's Sesame 3.0 of course.
However, I did not find a way to alter the affected version in the bug report.

Comment by Arjohn Kampman [16/Dec/09 11:25 AM]
OK, thanks for mentioning this issue. I've changed the version numbers to 3.0.