arne-bdt commented on issue #3455:
URL: https://github.com/apache/jena/issues/3455#issuecomment-3316161418

   > While the filter expression `FILTER(STRSTARTS(?x, "A"))` or 
`FILTER(STRSTARTS(?x, "A") && BOUND(?x))` becomes part of the left join (c.f. 
SQL `ON`) (top level FILTER in the RHS of OPTIONAL is a special case), the 
vcariable is onl inscope to the expression.
   > 
   > Add a layer of `{}` to move the FILTER to be RHS only, before the left 
join.
   > 
   > ```
   >  OPTIONAL { {
   >     FILTER(STRSTARTS(?x, "A") && BOUND(?x))    
   >     BIND(?x as ?z1)    
   >   } }
   > ```
   
   Thank you very much for your quick responses. 
   
   I see, that I now get nothing for ?z1 and ?z2.
   But I am a bit confused. Simply adding another layer of brackes with nothing 
new in between typically does not change behavior.
   Which parts of the [SPARQL language 
specification](https://www.w3.org/TR/sparql11-query/) do I have to re read with 
more caution? 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to