Aklakan commented on issue #1615:
URL: https://github.com/apache/jena/issues/1615#issuecomment-1316422038

   > Does the ?s in { ?s rdfs:label ?label } connect to the ?s before the 
LATERAL?
   
   I'd say "no scope rules" makes more sense when there is just LATERAL because 
otherwise aggregations would be complex to write. For example, I think that the 
query below should give for each class the capped count of its instances:
   ```sparql
   SELECT * {
      ?type a :Class
      LATERAL { SELECT (COUNT(*) AS ?cappedInstanceCount) { SELECT * { ?i a 
?type } LIMIT 10000 } }
   }
   ```
   
   Otherwise, if scoping rules were applied then one would have to weave in the 
lateral-joining variables into the aggregations - which imho is needlessly 
cumbersome:
   ```sparql
   SELECT * {
      ?type a :Class
      LATERAL { SELECT ?type (COUNT(*) AS ?cappedInstanceCount) { SELECT * { ?i 
a ?type } LIMIT 10000 } GROUP BY ?type }
   }
   ```
   


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