nkaralis opened a new issue, #2793: URL: https://github.com/apache/jena/issues/2793
### Version 5.2.0 ### Question Hello, I have some questions about the interaction of GRAPH graph patterns and subquries. I am using version 5.2.0. Assume the scenario described below. First, I load a graph into two separate named graphs. ```sparql LOAD <https://raw.githubusercontent.com/w3c/rdf-tests/refs/heads/main/sparql/sparql11/functions/data.ttl> INTO GRAPH <http://www.example.org/graph1> ; LOAD <https://raw.githubusercontent.com/w3c/rdf-tests/refs/heads/main/sparql/sparql11/functions/data.ttl> INTO GRAPH <http://www.example.org/graph2> ``` Both graphs contain 16 triples. The query provided below, returns the triples found in both graphs, which results in 32 solutions. Here, `?g` is always unbound. ```sparql SELECT * WHERE { GRAPH ?g { { SELECT ?s ?p ?o WHERE { ?s ?p ?o } } } } ``` The query provided below also returns 32 results. In this case, `?g` is always assigned a value (i.e., `<http://www.example.org/graph1>` or `<http://www.example.org/graph2>`) ```sparql SELECT * WHERE { GRAPH ?g { { SELECT * WHERE { ?s ?p ?o } } } } ``` I have the following questions: - First, why do these queries return different results? - Second, why does the second query return 32 results? For both queries, I was expecting 64 results: Cartesian product between the results of the subqueries (32 results) and the possbible values for `?g` (2 named graphs). Thank you in advance. -- 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]
