W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > January to March 2010

Re: Syntax of MINUS

From: Andy Seaborne <andy.seaborne@talis.com>
Date: Wed, 31 Mar 2010 11:35:15 +0100
Message-ID: <4BB32563.2000207@talis.com>
To: SPARQL Working Group <public-rdf-dawg@w3.org>


On 31/03/2010 11:11 AM, Alexandre Passant wrote:
>
> On 31 Mar 2010, at 09:13, Andy Seaborne wrote:
>
>> Should the syntax of MINUS be like UNION with {} on the left-hand side
>>
>> { { ?s a foaf:Person
>>     ?s foaf:name ?name
>>   }
>>   MINUS
>>   { ?s foaf:knows ?other }
>> }
>>
>> or without:
>>
>> { ?s a foaf:Person .
>>   ?s foaf:name ?name .
>>   MINUS { ?s foaf:name ?name }
>> }
>
> My preference for the second one, saves a few editing process when adding / removing a MINUS clause from an existing query.

For the record, we could change UNION to allow {}-less LHS

A chain of UNIONs would be

   pattern UNION { pattern } UNION { pattern }

This has no effect on SPARQL 1.0 style queries.

   { pattern } UNION { pattern } UNION { pattern }

is still legal and the same semantics.  It's just a tweak to the grammar 
- the same AST and same algebra would result.

(Ditto any future INTERSECTION which would presumably be the same as 
doing a join and projecting to common variables in SPARQL).

	Andy
Received on Wednesday, 31 March 2010 10:35:52 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 16:15:42 GMT