You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "Andy Seaborne (JIRA)" <ji...@apache.org> on 2017/05/31 15:46:04 UTC

[jira] [Resolved] (JENA-1354) Initial binding are passed out throug a projection.

     [ https://issues.apache.org/jira/browse/JENA-1354?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andy Seaborne resolved JENA-1354.
---------------------------------
    Resolution: Fixed

> Initial binding are passed out throug a projection.
> ---------------------------------------------------
>
>                 Key: JENA-1354
>                 URL: https://issues.apache.org/jira/browse/JENA-1354
>             Project: Apache Jena
>          Issue Type: Bug
>    Affects Versions: Jena 3.4.0
>            Reporter: Andy Seaborne
>            Assignee: Andy Seaborne
>             Fix For: Jena 3.4.0
>
>
> Bug introduced by JENA-1329.
> {noformat}
>     public static void main(String... args) {
>         Query q = QueryFactory.create("SELECT DISTINCT ?x {}") ;
>         Dataset ds = DatasetFactory.create(); //RDFDataMgr.loadDataset(dataFile) ;
>         QuerySolutionMap qsm = new QuerySolutionMap();
>         qsm.add("Z", ResourceFactory.createPlainLiteral("ZZZ"));
>         try(QueryExecution qExec = QueryExecutionFactory.create(q, ds, qsm)) {
>             qExec.execSelect().forEachRemaining(qs->System.out.println("qs=> "+qs));
>         }
>     }
> {noformat}
> prints
> {noformat}
> qs=> ( ?Z = "ZZZ" )
> {noformat}
> when it should be
> {noformat}
> qs=> 
> {noformat}
> This happens because of the DISTINCT makes the code not notice it is a root iterator, not from a nested SELECT in a {{(sequence)}}.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)