Re: Comment on: rq25

On 21/12/2009 15:51, Olivier Corby wrote:
>> 8 Negation - Testing for the absence of a pattern
>>
>> I am not really happy that the EXISTS and NOT EXISTS pattern can be used
>> in a filter.
>>
>> Could you say why that is?
>
> It is a feeling about language design.
> Graph pattern is about graph match and filter is about evaluable
> expressions. Here we mix both and that looks strange to me...
>
>
>> Yes it can be combined with any other expressions. The effect of &&
>> can be achieved anyway but not ||.
>>
>> FILTER( EXISTS {?x :tax :exempt} || ?taxCode = :special )
> What about:
>
> {EXISTS {?x :tax :exempt}} union { NOT EXISTS {?x :tax :exempt}
> filter(?taxCode = :special) }

In full, we have

{
   pattern
   FILTER( EXISTS {?x :tax :exempt} || ?taxCode = :special )
}

then
{ pattern
   EXISTS {?x :tax :exempt}}
union
{ pattern
   NOT EXISTS {?x :tax :exempt}
}

and pattern has be duplicated doesn't it?.  "pattern" may be quite 
large.  The FILTER form means the pattern occurs once.

>
>
>> The new variable is introduced using the keyword AS; it must not already
>> be potentially bound.
>> Do you have an suggestions for text changes?
> May be we can list the places where the 'variable' cannot be used ?
>

Sure - it'll be tricky langauge because of nested SELECTs.

A start is in: rq25.xml#ast_select_expressions

 Andy

> Olivier
>
>
>
>
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email
> ______________________________________________________________________

Received on Tuesday, 22 December 2009 12:25:43 UTC