[
https://issues.apache.org/jira/browse/JENA-294?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13434431#comment-13434431
]
Andy Seaborne commented on JENA-294:
------------------------------------
Fixing the simple case and only the simple case is in danger of breaking other
queries. I guess your internal use case has an optional that, in practice, is
matched. That works in various ways.
I tried your suggestion and for
SELECT *
{
OPTIONAL { ?x :q ?o }
FILTER(?x = :x)
}
I get
(assign ((?x :x))
(conditional
(table unit)
(bgp (triple :x :q ?o))))
which is always assigning, even when the leftjoin/conditional does not match.
It should remove the row by filter. See full example above.
> TransformFilterEquality does not handle starting OPTIONAL well
> --------------------------------------------------------------
>
> Key: JENA-294
> URL: https://issues.apache.org/jira/browse/JENA-294
> Project: Apache Jena
> Issue Type: Improvement
> Components: ARQ
> Affects Versions: Jena 2.7.4
> Reporter: Simon Helsen
> Attachments: patch.txt
>
>
> There was one other case where our tests were stuck on a very slow query
> execution because transformFilterEquality failed to optimize. The problem is
> that the optimizer gives up whenever the WHERE clause starts with an OPTIONAL
> clause. The reason is that the generated algebraic formula starts with a
> TableUnit and this is not handled correctly.
> I have attached a patch which fixes the problem
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira