Re: the LHS of OPTIONAL

Lee Feigenbaum wrote:
> (I promised Andy a note on my concerns about OPTIONAL, so here it is. 
> Opinions sought.)

Thanks!

...
> 
> {
>   { T1 } UNION { T2 } .
>   T3 .
>   OPTIONAL { T4 . }
> }
> 
> Is this:
>   Group( Optional( Group( Union(T1, T2), T3), Group(T4) ) ) )
> or
>   Group( Union(T1, T2), Optional( Group(T3), Group(T4) ) )
> 
> That is, does OPTIONAL pull in everything before it (but in the same 
> group) to form the implicit LHS group, or just the nearest bunch of triple 
> patterns and filters? I suspect the former, but find this confusing.

rq24-algebra provides a decision procedure for this (roughly, left-associativity).

A group is a sequence of Join()'s or LeftJoins() (for OPTIONAL).  There is no 
optional() as such.  There is no Group() after it is translated into the algebra.

	Andy

Received on Monday, 20 November 2006 19:35:59 UTC