thanks Andy, I see the reason and it makes sense
Simon From: Andy Seaborne <[email protected]> To: [email protected] Date: 06/20/2012 02:57 AM Subject: Re: ARQ eliminates duplicates during unionDefaultGraph? On 19/06/12 14:32, Simon Helsen wrote: > Hi guys, > > I recently ran into a query which produced a surprising result and it is > not clear to me if I don't understand the spec correctly or whether it is > an ARQ bug. The scenario is that you have a quad store with e.g. 2 > identical triples, except that they live in 2 separate graphs. So > > if your store contains the following 2 quads > > <s1> <p1> <o1> <g1> > <s1> <p1> <o1> <g2> > > and you execute the following query with unionDefaultGraph=true > > SELECT ?s > WHERE { > ?s<p1> <o1> > } > > would you not expect two results? It seems that the current ARQ returns > only one result, i.e. by crossing the graphs during unionDefault, it seems > to eliminate duplicates. That is unexpected to me, but perhaps there is > something in the spec I am not aware of > > Any thoughts? > > Simon An RDF graph is a set of triples. A set does not have duplicates. How the graph is formed does not matter; it must behave like a set. So Jena removes duplicates for a union default graph. Andy
