arne-bdt opened a new issue, #3455:
URL: https://github.com/apache/jena/issues/3455

   ### Version
   
   5.6.0-SNAPSHOT
   
   ### What happened?
   
   The query:
   ```SPARQL
   SELECT ?x ?y ?z1 ?z2
   WHERE
   {
     VALUES ?x { "A" "B" }
     
     BIND(?x as ?y)
     
     OPTIONAL {
       FILTER(STRSTARTS(?x, "A"))    
       BIND(?x as ?z1)    
     }
     
     OPTIONAL {
       FILTER(STRSTARTS(?x, "A"))    
       BIND("starts with A" as ?z2)    
     }
   } 
   ```
   returns
   ```TSV
   ?x   ?y      ?z1     ?z2
   "A"  "A"             "starts with A"
   "B"  "B"             
   ```
   
   But I would expect ?z1 to be "A" in the first row:
   ```TSV
   ?x   ?y      ?z1     ?z2
   "A"  "A"     "A"     "starts with A"
   "B"  "B"             
   ```
   Within the OPTIONAL block, I may use any new expression like I demonstrated 
with ?z2 in BIND but no existing variable which I tried with ?z1.
   
   Is this a bug or not?
   
   ### Relevant output and stacktrace
   
   ```shell
   
   ```
   
   ### Are you interested in making a pull request?
   
   Maybe


-- 
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