[
https://issues.apache.org/jira/browse/JENA-1534?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16456867#comment-16456867
]
ASF GitHub Bot commented on JENA-1534:
--------------------------------------
GitHub user afs opened a pull request:
https://github.com/apache/jena/pull/409
JENA-1534: Test for filter-only variables in EXISTS.
Tighten the classifer, assumes proper use of (sequence)
Relates to JENA-1167, JENA-1280.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/afs/jena vars-not-exists
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/jena/pull/409.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #409
----
commit 1bd5fdcf3ac0694e0bbabd2f8e63deb92d3c2bff
Author: Andy Seaborne <andy@...>
Date: 2018-04-27T18:12:37Z
JENA-1534: Test for filter-only variables in EXISTS.
Tighten the classifer, assumes proper use of (sequence)
Relates to JENA-1167, JENA-1280.
----
> Variables in EXISTS must be considered for the join strategy
> ------------------------------------------------------------
>
> Key: JENA-1534
> URL: https://issues.apache.org/jira/browse/JENA-1534
> Project: Apache Jena
> Issue Type: Bug
> Components: ARQ
> Affects Versions: Jena 3.7.0
> Reporter: Andy Seaborne
> Assignee: Andy Seaborne
> Priority: Major
> Fix For: Jena 3.8.0
>
>
> This query has a join between the GRAPH and the pattern before it.
> {noformat}
> SELECT *
> WHERE
> { ?s ?p ?V0
> GRAPH ?g
> { ?sx ?p ?ox
> FILTER EXISTS { _:b0 ?p ?V0 }
> }
> }
> {noformat}
> The fact {{?V0}} occurs in the LHS of the join in {{?s ?p ?V0}} and in the
> FILTER but not in the rest of the RHS means the "sequence" transform can not
> be used.
> Contrast to:
> {noformat}
> SELECT *
> WHERE
> { ?s ?p ?V1
> GRAPH ?g
> { ?sx ?p ?ox
> FILTER EXISTS { _:b0 ?p ?V2 }
> }
> }
> {noformat}
> Now {{?V2}} is only in the FILTER so it is safe to transform the join.
> Note that {{?p}} appears in LHS so making it defined in the EXISTS and the
> sequence transfrom is possible.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)