W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > October to December 2009

Re: agenda for tomorrow...

From: Andy Seaborne <andy.seaborne@talis.com>
Date: Mon, 07 Dec 2009 18:53:14 +0000
Message-ID: <4B1D4F1A.5050208@talis.com>
To: Axel Polleres <axel.polleres@deri.org>
CC: SPARQL Working Group <public-rdf-dawg@w3.org>

On 07/12/2009 17:57, Axel Polleres wrote:
> ... will be sent out later tonite:

Sorry for this very rushed email but I am unable to spend time on 
SPARQL-WG tomorrow morning and anyway that would be too late for many 
people to have had a chance to catch up.

> Essentially, I plan to discuss the issues not covered last time
> * Do aggregate functions need to be set off syntactically?

Steve sends his regrets:

> * Scope of alias variables


Nearby: ISSUE-41, ISSUE-12

Rather than a general discussion, can we start with a strawman:

Discussion emails:



   (NB typo in that message)


Expressions do not have side-effects.

# ?C can be used in a expression to the right,
# but not left, of it's definition.
SELECT (count(*) AS ?C)  (?Num/?C AS ?X)

# 2009OctDec/0414.html
# HAVING, and ORDER BY, can reference a project variable.
select ?x count(?doc) as ?count where {
?x :hasCreated ?doc
group by ?x
having (?count > 10)

This one crosses aggregates and select expressions so is not in [1] and 
complicates Step 2 and Step 3 of modifier translation but they are 
already needing reworking anyway so that aggregates can be used in HAVING:

  having (count(?doc) > 10)

In outline, the translation is:

SELECT covers two operators: extend and project. Put the "extend" 
operations as in [1] immediate around the group (just after the algebra 
for GROUP BY and aggregate calculation and just before HAVING) and the 
projection outside the HAVING.  They are already in this order in [1] - 
it's just extending it to HAVING.

pattern => group inc aggregate calculation =>
    extends => having => order by => project =>
      distinct => reduced => offset/limit

With the SELECT expressions currently, it's no possible to introduce a 
variable then project it away.

# Can't use a variable introduced  in a SELECT expression inside the 
SELECTs pattern.

SELECT (?x+1 AS ?y)  { ... ?y ... }
is illegal scoping (see [1]) and is a static syntax check.


> plus (time allowed)
> * Andy's proposal for SELECT expressions [1]


I propose

SELECT ( _:b1 AS ?blank )

is not legal in the grammar, that is blank nodes can not be used in 
expressions for select-expressions (which is good ebcause they are not 
legal in expressions in FILTER currently.


> details to follow, apologies
> Axel
> 1. http://www.w3.org/2009/sparql/docs/query-1.1/select-expr-defs-1-1.html

Received on Monday, 7 December 2009 18:53:34 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:00:57 UTC