ericprud opened a new issue, #1933:
URL: https://github.com/apache/jena/issues/1933

   ### Version
   
   SPARQLer as of 2023-06-29
   
   ### What happened?
   
   SPARQL Query says:
   
   > If the form with a simple literal is used, every call results in distinct 
blank nodes for different simple literals, and the same blank node for calls 
with the same simple literal within expressions for one [solution 
mapping](https://www.w3.org/TR/2013/REC-sparql11-query-20130321/#defn_sparqlSolutionMapping)
   
   (which requires updates in 1.2). I read this to say that all bindings of 
`BNODE("b1")` should be the same BNode, i.e.:
   
   ``` SPARQL
   CONSTRUCT { ?b <p> "x" } WHERE {
     { BIND (BNODE("b1") AS ?b) }
    UNION
     { BIND (BNODE("b1") AS ?b) }
   }
   ```
   should emit one triple. Instead we get:
   ``` turtle
   [ <http://server/unset-base/p>  "x" ] .
   [ <http://server/unset-base/p>  "x" ] .
   ```
   
   GROUP BY doesn't seem to diagnose this because:
   ``` SPARQL
   SELECT (COUNT(*) AS ?c) WHERE {
     { BIND (BNODE("b1") AS ?b) }
    UNION
     { BIND (BNODE("b1") AS ?b) }
   } GROUP BY ?b
   ```
   gives ?c=1, but it also does for:
   ``` SPARQL
   SELECT (COUNT(*) AS ?c) WHERE {
     { BIND (BNODE("b1") AS ?b) }
    UNION
     { BIND (BNODE("b2") AS ?b) }
   } GROUP BY ?b
   ```
   I'm pretty unlikely to find time to dig into this.
   
   
   ### Relevant output and stacktrace
   
   _No response_
   
   ### Are you interested in making a pull request?
   
   No


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