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

Re: Query 1.1 Review

From: Andy Seaborne <andy.seaborne@talis.com>
Date: Tue, 05 Jan 2010 10:59:42 +0000
Message-ID: <4B431B9E.3020601@talis.com>
To: matthew.perry@oracle.com
CC: W3C SPARQL Working Group <public-rdf-dawg@w3.org>, steve.harris@garlik.com, "Das,Souripriya" <souripriya.das@oracle.com>


On 04/01/2010 9:50 PM, Matt Perry wrote:
> Hi,
>
> Overall, the draft looks very good. I have some detailed comments below.
>
> Thanks,
> Matt
>
> ** General Questions:
>
> 1) What is the expected behavior for GRAPH queries inside GRAPH queries
> (this nesting could occur in a lot of situations)?
> I couldn't find a discussion of this in the docs.
>
> For example,
> { GRAPH ?g1 { ?a :p1 ?b GRAPH ?g2 { ?c :p2 ?d } }
>
> Does triple ?c :p2 ?d have to belong to both g1 and g2, or only g2, etc.

Just graph ?g2.

GRAPH changes the "active graph" (the one matched against) and there is 
only one active graph at any one point in the query.

See "Definition: Evaluation of a Graph Pattern"
http://www.w3.org/TR/rdf-sparql-query/#defn_evalGraph

> ** Section 8 Negation:
>
> 1) Why have different variable scope for FILTER and non-FILTER cases for
> EXISTS and NOT EXISTS? What would we lose by having the non-filter form
> apply to the whole group in which the EXISTS / NOT EXISTS appears
> instead of only variables defined earlier in the pattern? I'm not sure
> why we need this extra complication.

Because order of patterns is more important for negation.  In a BGP, the 
order of matching does not matter as to the final answers.  But with 
negation, if a variable name appears in the negated pattern and also in 
the pattern outside the negation, order does matter.

The use in FILTER allows combining (with || because && does not add 
anything - FILTERS in evolving && can be split up ) with other filter 
tests e.g.

FILTER ( EXISTS{:x :age "validated"} || ?age >= 21 )

> ** Section 13.1.2 SELECT expressions:
>
> 1) As far as SPARQL grammar is concerned, is "Expression" here the same
> as "Expression" in FILTER and ORDER BY? If so, that answers the next
> question.

Yes.

> 1) Are constants allowed in SELECT expressions (e.g. SELECT ?s
> (<http://myProp> as ?p) ?o WHERE ... )? If so, it may be worth adding an
> example with a constant.

Yes.

(I've made a note on my ToDo list to put in a constant example if when 
we revise the examples, it makes sense)

>
> ** Minor Comments:
>
> 1) In "Status of this Document": "In this publication,
> new content is gathered together for ** easy => ease ** of review of
> these new features."

Fixed.

	Thanks for the comments,
	Andy
Received on Tuesday, 5 January 2010 11:00:12 GMT

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