- From: Andy Seaborne <andy.seaborne@talis.com>
- Date: Mon, 21 Dec 2009 14:56:10 +0000
- To: Olivier Corby <Olivier.Corby@sophia.inria.fr>
- CC: SPARQL Working Group <public-rdf-dawg@w3.org>
On 21/12/2009 10:19, Olivier Corby wrote: > I have some comments on rq25. > > Olivier > > > > The structure of this doucment > -> > document > > > 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? > Should this happen, can it be used with the boolean operators: && || ! 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 ) > > > > This sentence is not clear: > > In the case where the NOT EXISTS pattern is used, it applies only to > variables defined earlier in the pattern. Yes - terrible wording. I want to rework this section anyway. The point it's trying to make should not be made in an intro paragraph. it trying to say: { :x :p ?v . NOT EXISTS { ?r :q ?v } ?r :p2 ?w } does not use ?r from the later pattern. > > In the example given, the ?name variable is not defined earlier in the > pattern: > > ?person rdf:type foaf:Person . > NOT EXISTS { ?person foaf:name ?name } > > > > > This sentence is odd: > > Translation of a filter expression in that uses NOT EXISTS or EXIST in a > FILTER proceeds as for all other filter operations. > > > > The example is given twice : > > { ?s rdf:type <t> > NOT EXISTS { ?s <p> ?v } > ?s :p ?o > } > > Example: > > { ?s rdf:type <t> > > NOT EXISTS { ?s <p> ?v } > > ?s :p ?o > } > I've tried to fix this up- the translation from HTML didn't always work cleanly. > ... > 12.1.2 SELECT expressions > > > in the SELCT clause > -> > SELECT > > > Question about this sentence: > > The new variable is introduced using the keyword AS; it must not already > be potentially bound. The algorithm for translation from syntax to the algebra speesl out the conditions. In your example, we have join( { ?doc :price ?price } { select ?x (?p + 10) as ?price ... } ) so ?price is not potentially bound (it's bottom up evaluation) and ?price is joined across the two evaluated subexpressions. Do you have an suggestions for text changes? > > What about this case with subquery: > > select * where { > ?doc :price ?price > {select ?x (?p + 10) as ?price where { > ?x :price ?p} > } > } > > > Typo? > > The syntax error arises for use of a variable *in as* the target of AS Changed - but there isn't a good name for the variable to the right of AS being introduced. Any suggestions, anyone? > (e.g. > ... AS ?x) when the variable is used inside the WHERE clause of the SELECT. > > Is it an error if the variable is used in ORDER BY, GROUP BY ? > and in HAVING (in the case of aggregate) ? No. > > What about distinct, does it select distinct values of price ? > > select distinct price(?doc) as ?price where { > ?doc :author ?a > } Yes. DISTINCT is a modifier that happens after the expressions have been evaluated and the nre variables bound. Andy
Received on Monday, 21 December 2009 14:56:33 UTC