subqueries in FILTERs / EXISTS in FILTERs (was: Re: Views on the outcomes of F2F)

>  > **  Sub-asks and sub-selects in FILTER
>  >
>  > General consensus (kasei, axel, steveh, leef) to avoid
>  > the complexity of any subqueries in FILTERs.
> 
> Agreed - the meaning of patterns (scoping of free variables) would need 
> join-like semantics and is complex.  The lack of scalar subSELECTs will 
> be a potnetial area for consideration problem but is mitigated by having 
> named variables in SPARQL.
> 
> You can place the scalar select just be for the FILTER and AS the result 
> into a variable.  This is not an equivalence, the query pattern may be 
> slight different, but you can get the effect as far as I can determine.
> 
> Sub-Ask is not the same as (NOT) EXISTS because EXISTS isn't join-ed 
> with other results.

I don't think I understand this subtlety and (given that) I don't think 
this is a consideration that was expressed or discussed at the F2F. The 
prevailing thought was that anything that looked like triple patterns 
shouldn't go in a FILTER. People thought that an EXISTS clause (natural 
companion of NOT EXISTS) in a graph pattern handled most cases for an 
EXISTS filter. There was discussion of disjunctions, but the attendees 
were overall not motivated by the need to write a UNION instead of a 
FILTER with ||.

Lee

Received on Friday, 13 November 2009 04:52:07 UTC