RE: Questions about OPTIONAL

> -----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 UTC