Re: NOT EXISTS vs. MINUS

On 29/03/2011 22:09, Axel Polleres wrote:

> thanks for your thorough and helpful feedback.
>
> This addresses your comment on NOT EXISTS vs. MINUS [1] which you
> later refined in [2]. Your other comments on aggregates in [2] will
> be answered in a separate mail.
>
> Essentially, it seems your concern boils down to the following
> paragraph of your mail:
>
>> This leaves us with two scenarios:
>>
>> 1. the two patterns share a variable, in this case the MINUS can
>> be replaced with a NOT EXISTS; 2. the two patterns do not share a
>> variable, in this case the MINUS can be ignored.
>>
>> All in all it seems to me that MINUS as currently defined does not
>> add additional expressivity to the language and is only a syntactic
>> variant.
>
> Let me first emphasize that the reason we have two negation forms is
> because it reflects two ways of thinking about negation. it's not
> expressivity in the technical sense, it's more about how people
> think about it and this has eventually evolved into two proposals in
> the group which have different syntax.

Fair enough. Note that I am not objecting to having something that is
"merely" a syntactic variant. My comment was more motivated by confusion
about whether or not this was the intent. Thanks for clarifying.

> Next, find an example where MINUS and NOT EXISTS are actually
> different, despite variables are shared. The differences in this
> example are based on NOT EXISTS relying on the variable substitution
> that happens during filter function evaluation:

[snip good example]

> Hope this helps for clarification. We'd appreciate if you could
> indicate whether this response adequately addresses your comment.

It does. Thanks for taking the time and for providing not one but two
good counter-examples. I may have to run my implementations through a
few extra testcases to see if I've got it right :)

Best regards,

Jeen

Received on Tuesday, 29 March 2011 19:44:10 UTC