Re: Another attempt...

On 19/03/2008, Lee Feigenbaum <lee@thefigtrees.net> wrote:
> Can you explain either where the specification is incomplete with
>  regards to evaluating this query or else what you'd prefer the results
>  of this query to be?
>

This is very frustrating my first email had the example queries.  I
said the results of:
select *
where {
 {?s ?p ?o} . {}
}

Contradicts the results of:
select *
where {
 {?s ?p ?o} union {}
}

I suggest that the second query return {} (as {} is defined in the SPARQL spec).

The results don't make sense with respect to JOIN identity (which is
defined in the SPARQL specification).  Unless SPARQL is creating its
own algebra (if it is it has a lot of explaining to do - which I'm
happy to read) and is ignoring existing set and/or bag algebra then
the current results being returned by most/all SPARQL implementations
is wrong.

I'd suggest the SPARQL group does reuse existing algebras.  Wikipedia
has some nice articles on bags and set algebras:
http://en.wikipedia.org/wiki/Algebra_of_sets
http://en.wikipedia.org/wiki/Multiset

I suggest the working group reads these, understands them (especially
proposition 3 of the algebra of sets and multisets just being sets
with cardinality) and adopts them.  This will help implementers and
users of SPARQL if it reuses an existing algebra.

I did try and give helpful alternatives:
* Make the empty group pattern act like empty set (as it's the closest
conceptually) and add a new universal group pattern.  Or maybe just
change the syntax, rename it and make the description more clear.

* Define a union identity and maybe make it expressible.

* Complete specifying identities in the SPARQL document.  What does 1
do in respect to UNION?  And possibly 0 in respect to JOIN.  The way I
was able to determine what 1 does with respect to UNION was run ARQ
and the answer (A + 1) wasn't correct at least with respect to set and
relational algebra.  Maybe it's defined in the set of tests (I haven't
checked) but it should be in the document too.  Anyway, it's not clear
why it's different to existing algebras (maybe add that too?).

Received on Wednesday, 19 March 2008 07:18:53 UTC