[
https://issues.apache.org/jira/browse/JENA-616?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13856394#comment-13856394
]
Andy Seaborne commented on JENA-616:
------------------------------------
Note these optimizations can have other effects as well.
In {{(sequence)}} and {{(conditional)}} the filter can be pushed into a
subpart. This does not apply to {{(join)}} or {{(leftjoin)}} - only the alegra
forms of joins where scoping allows the left hand side to be seen by the right.
so what used to be
{noformat}
(filter (?x = <uri>)
(sequence
pattern1
pattern2
))
{noformat}
which became
{noformat}
(assign ((?x = <uri>))
(sequence
pattern1 with ?x replaced by <uri>
pattern2 with ?x replaced by <uri>
))
{noformat}
would now become
{noformat}
(sequence
(assign ((?x = <uri>))
pattern1 with ?x replaced by <uri>
) # End assign
pattern2
))
{noformat}
For ARQ normal execution strategy, which flows the output of pattern1 in the
{{(sequence)}} into pattern2, the effect is the same.
See
* {{TestTransformFilters.optionalEqualityScope_02}}
* {{TestTransformFilters.optionalEqualitySubQuery_02}}
If it makes an observed difference, the optimization can be applied twice as
noted in {{Optimize}}.
> Order of FILTER placement and FILTER equality transformation can be
> sub-optimal.
> --------------------------------------------------------------------------------
>
> Key: JENA-616
> URL: https://issues.apache.org/jira/browse/JENA-616
> Project: Apache Jena
> Issue Type: Bug
> Affects Versions: Jena 2.10.1
> Reporter: Andy Seaborne
> Assignee: Andy Seaborne
> Priority: Minor
>
> In Jena 2.10.1, the equality transform is done before the filter placement.
> This order of applying these two optimizations is not optimal if the filter
> placement enables the equality transform where it was not going to be applied
> before.
> JENA-595 pushes filter placement more deeply inside compound patterns so it
> is possible that the filter now applies to a smaller pattern where the
> equality transform is now valid.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)