W3C home > Mailing lists > Public > public-rdf-dawg-comments@w3.org > February 2005

RE: Questions about OPTIONAL

From: Geoff Chappell <geoff@sover.net>
Date: Fri, 25 Feb 2005 09:27:00 -0500
To: <andy.seaborne@hp.com>
Cc: <public-rdf-dawg-comments@w3.org>
Message-ID: <023601c51b46$12a0b5b0$6401a8c0@gsclaptop>



> -----Original Message-----
> From: Seaborne, Andy [mailto:andy.seaborne@hp.com]
> Sent: Friday, February 25, 2005 6:54 AM
> To: Geoff Chappell
> Cc: public-rdf-dawg-comments@w3.org
> Subject: Re: Questions about OPTIONAL
> 
[...]
> Just to be quite sure here - by "triple", you mean the triple pattern?
> Not a
> triple from the data.  That reading seems consistent with your examples
> below.

Yes.
 
[...]
> Optional can't reduce the number of input solutions, though it can
> increase them

Are you saying this is part of the definition of OPTIONAL or are you
describing its behavior in your implementation?

If the former is the case, I think you'll have a hard time coming up with
order-independent semantics for OPTIONAL. I imagine the only choice you'll
have is to require an evaluation order such as Jeen Broekstra described
where all OPTIONALs are evaluated last. The biggest problem I see with that
approach is that certain queries just won't work - e.g.:

	(?x ?p ?a) optional(?x ?y ?z) optional (?a ?b ?y)

Not to mention that you've strayed from a purely declarative model which
among other things makes it more difficult to map on to other systems (for
example, I can no longer do a simple sparql->rdfql rewrite for rdf gateway.
Instead, I'll have to build a separate sparql query parser and planner
rather than using the existing execution planner).

-Geoff
Received on Friday, 25 February 2005 14:27:20 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:14:47 GMT