W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > January to March 2011

Re: SPARQL Query 1.1 review

From: Birte Glimm <birte.glimm@comlab.ox.ac.uk>
Date: Tue, 15 Feb 2011 11:10:49 +0000
Message-ID: <AANLkTikbwhquAwpBeudxsiV3ZFHCB42s4OW1ZHmHthoi@mail.gmail.com>
To: Andy Seaborne <andy.seaborne@epimorphics.com>
Cc: SPARQL Working Group <public-rdf-dawg@w3.org>
On 12 February 2011 17:46, Andy Seaborne <andy.seaborne@epimorphics.com> wrote:
> On 11/02/11 12:36, Birte Glimm wrote:
>> Similarly, I am concerned about FILTER EXISTS and FILTER NOT
>> EXISTS. MINUS is a proper algebra operator, which combines
>> solutions sequences, but having EXISTS and NOT EXISTS defined as
>> filters is not in line with how filters previously worked, i.e., by
>> working on RDF terms that result from applying given solutions to the
>> variables followed by evaluating the filter expression (see also
>> description in the itemise of 17.2). FILTER EXISTS and FILTER NOT
>> EXISTS require the evaluation of BGPs, so that is quite a different
>> thing and would require an algebra translation that somewhere has a
>> Bgp(...) element in it, which does not seem to be the case at the
>> moment. This might just be the case because Section 18 is not yet
>> ready, but even though FILTER [NOT] EXISTS uses the FILTER keyword, it
>> might be better to not treat them in the same way as other filters or
>> not even use the FILTER keyword at all. I would rather like to see
>> them as first class operators like MINUS or OPTIONAL.
> We have seen that both NOT EXIST and MINUS reflect ways of thinking about
> negation.
> FILTER NOT EXISTS may be usefully combined with other conditions with ||.
> This is why having the FILTER ([NOT] EXISTS ....) and short form NOT EXISTS
> makes sense to me.
> For example:
>  ?x a :Climber .
>  ?x :age ?age .
>  FILTER ( EXISTS { ?x :signedoff true } || ?age >= 18 )
> filters for people who have either been signed off for climbing without
> supervision or who are 18 or over (and hence don't need supervision).
> This reflects SQL EXISTS <table subquery> usage where references inside the
> <table subquery> refer to the current row.
> I believe that the other subquery situations from SQL (<scalar subquery>,
> <row subquery>) will be desirable in SPARQL sometime.  This would place
> graph patterns in expressions for a scalar subquery, for example.
>        Andy

I agree that both [NOT] EXISTS and MINUS have their advantages and
maybe my concern is unnecessary and just due to the fact that Sec. 18
is not ready. Lets postpone any discussions until the algebra is ready
because only then one can really discuss any possible issues if there
are any.


Dr. Birte Glimm, Room 309
Computing Laboratory
Parks Road
United Kingdom
+44 (0)1865 283520
Received on Tuesday, 15 February 2011 11:11:21 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:01:03 UTC