You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2017/05/31 15:32:05 UTC
[jira] [Commented] (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:comment-tabpanel&focusedCommentId=16031349#comment-16031349 ]
ASF subversion and git services commented on JENA-1354:
-------------------------------------------------------
Commit 08abdebaedd869804c592f112d2cd225385c4186 in jena's branch refs/heads/master from [~andy.seaborne]
[ https://git-wip-us.apache.org/repos/asf?p=jena.git;h=08abdeb ]
JENA-1354: Create a marked root iterator for initialBindings
> 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)