Re: SPARQL optional limiting results

2022-03-18 Thread Mikael Pesonen
Okay thanks. This stuff is complicated... On 18/03/2022 16.20, Andy Seaborne wrote: The OPTIONAL uses ?graph. So it isn't simple a matter of "optional adds rows" After the optional happens, there is a new condition on ?graph. The inside of GRAPH ?graph { inner } is executed then joined to

Re: SPARQL optional limiting results

2022-03-18 Thread Andy Seaborne
The OPTIONAL uses ?graph. So it isn't simple a matter of "optional adds rows" After the optional happens, there is a new condition on ?graph. The inside of GRAPH ?graph { inner } is executed then joined to ensure ?graph is the right value. On 18/03/2022 12:52, Mikael Pesonen wrote: Hi

Re: SPARQL optional limiting results

2022-03-18 Thread Mikael Pesonen
Hi Martynas, So query below returns some extra columns (but fewer rows) with OPTIONAL. With OPTIONAL only one item is returned from graph http://www.yso.fi/onto/mesh/ . Without OPTIONAL two items are returned, one from each graph. Data is available on bottom

Re: SPARQL optional limiting results

2022-03-18 Thread Martynas Jusevičius
Can you provide a full query string and a data sample that illustrate the problem? Then it's easy to see what's going on, for example on http://sparql.org/sparql.html. On Fri, Mar 18, 2022 at 11:52 AM Mikael Pesonen wrote: > > > Is this a problem with query, not with Jena? > > On 15/03/2022

Re: SPARQL optional limiting results

2022-03-18 Thread Mikael Pesonen
Is this a problem with query, not with Jena? On 15/03/2022 9.30, Lorenz Buehmann wrote: Hi, I'm probably misunderstanding the query, but what is the purpose of the OPTIONAL here? ?graph is bound because of VALUES clause, ?concept is bound because of the graph pattern before the OPTIONAL