[ 
https://issues.apache.org/jira/browse/JENA-1515?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16648471#comment-16648471
 ] 

ASF GitHub Bot commented on JENA-1515:
--------------------------------------

Github user Claudenw commented on a diff in the pull request:

    https://github.com/apache/jena/pull/479#discussion_r224920678
  
    --- Diff: 
jena-extras/jena-querybuilder/src/main/java/org/apache/jena/arq/querybuilder/rewriters/ElementRewriter.java
 ---
    @@ -103,17 +103,13 @@ public void visit(ElementBind el) {
        @Override
        public void visit(ElementData el) {
                ElementData retval = new ElementData();
    -           Iterator<Var> vars = el.getVars().iterator();
    -           Iterator<Binding> bindings = el.getRows().iterator();
    -           while (vars.hasNext()) {
    -                   Var v = vars.next();
    -                   if (values.containsKey(v)) {
    -                           bindings.next(); // skip the binding
    -                   } else {
    -                           retval.add(v);
    -                           retval.add(rewrite(bindings.next()));
    -                   }
    +           for (Var v : el.getVars()) {
    +                   retval.add(v);
                }
    +           for (Binding binding : el.getRows())
    +           {
    --- End diff --
    
    not sure what this comment means.  The style of the looping is different 
and has a different result.


> Values added to subQuery are stripped by QueryBuilder
> -----------------------------------------------------
>
>                 Key: JENA-1515
>                 URL: https://issues.apache.org/jira/browse/JENA-1515
>             Project: Apache Jena
>          Issue Type: Bug
>          Components: QueryBuilder
>    Affects Versions: Jena 3.6.0, Jena 3.7.0
>            Reporter: Claude Warren
>            Assignee: Claude Warren
>            Priority: Minor
>
> If values are added to a subQuery via the addValue methods the values are 
> stripped when the subquery is added to the outer query.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to