rvesse commented on issue #2793:
URL: https://github.com/apache/jena/issues/2793#issuecomment-2435258013

   Can you provide details of what your storage setup is e.g.
   
   - Is this TDB2 or an in-memory dataset?
   - Do you have unionDefaultGraph enabled by any chance?
   - Providing the Fuseki config file if using Fuseki would be helpful
   
   In algebra terms these end up being different algebra's which likely 
explains the difference in results.
   
   Your first query yields the following algebra:
   
   ```
   (base <http://example/base/>
     (project (?s ?p ?o)
       (quadpattern (quad ?g ?s ?p ?o))))
   ```
   
   While your second yields the following algebra:
   
   ```
   (base <http://example/base/>
     (quadpattern (quad ?g ?s ?p ?o)))
   ```
   
   Notice that with the `SELECT *` in the inner query the `project` step is 
omitted from the generated algebra so `?g` is always unbound.  However, I'm not 
sure if this is the correct behaviour here, probably a question for @afs to 
answer
   
   ---
   
   > 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).
   
   That shouldn't ever be the case, the way a `GRAPH ?g` clause is logically 
defined is that the inner pattern is executed independently for each graph in 
the dataset and the results are union'd together with the .  So each graph 
independently yields 16 results and these union together to yield 32 results.
   


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