[
https://issues.apache.org/jira/browse/JENA-881?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14310698#comment-14310698
]
ASF subversion and git services commented on JENA-881:
------------------------------------------------------
Commit 491d0f9647ab215434c74e7145859d02542deeec in jena's branch
refs/heads/master from [~andy.seaborne]
[ https://git-wip-us.apache.org/repos/asf?p=jena.git;h=491d0f9 ]
JENA-881: Change test results - order in exprlists has changed.
> Leaking from scope or dropping of filter expressions
> ----------------------------------------------------
>
> Key: JENA-881
> URL: https://issues.apache.org/jira/browse/JENA-881
> Project: Apache Jena
> Issue Type: Bug
> Components: ARQ, Optimizer
> Affects Versions: Jena 2.11.2, Jena 2.12.0, Jena 2.12.1
> Reporter: Andy Seaborne
> Assignee: Andy Seaborne
> Fix For: Jena 2.13.0
>
>
> This query (much reduced from a real example):
> {noformat}
> SELECT *
> WHERE
> { { FILTER ( false ) }
> UNION
> { FILTER ( ?z != 3 ) }
> FILTER ( true )
> }
> {noformat}
> generates this algebra before optimization (specifically, filter placement):
> {noformat}
> (filter true
> (union
> (filter false
> (table unit))
> (filter (!= ?z 3)
> (table unit)))))
> {noformat}
> which is mis-optimized into:
> {noformat}
> (union
> (filter (exprlist false true)
> (table unit))
> (filter true
> (table unit)))
> {noformat}
> and gives a result of one row when it should be zero rows. This is because
> the {{(!= ?z 3)}} has been lost.
> Other cases leak the filter from its place in the tree:
> {noformat}
> (filter (!= ?x 4)
> (extend ((?z 6))
> (filter (= ?z 3)
> (table unit))))
> {noformat}
> becomes:
> {noformat}
> (filter (exprlist (= ?z 3) (!= ?x 4))
> (extend ((?z 6))
> (table unit)))
> {noformat}
> which is wrong because the {{(= ?z 3)}} has moved outwards over the
> {{extend}}.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)