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

Re: another question on "SELECT *"

From: Axel Polleres <axel.polleres@deri.org>
Date: Thu, 14 Oct 2010 09:33:09 -0300
Cc: "SPARQL Working Group" <public-rdf-dawg@w3.org>
Message-Id: <D2FFA3C1-D74B-4A0B-84B8-95093FB32281@deri.org>
To: "Lee Feigenbaum" <lee@thefigtrees.net>
As for aggregates (mentioned by Andy),  

  SELECT * (agg(Expr) AS ?var)

could indeed make sense, taken that * implicitly projects all grouped variables 
(following the definition of "potentially bound")

As for the grammar, it seems to me that it wouldn't mean an extreme extra burden:

Just replace:

[8]  SelectClause  ::=  'SELECT' ( 'DISTINCT' | 'REDUCED' )? ( ( Var | ( '(' Expression 'AS' Var ')' ) )+ | '*' )

with:

[8]  SelectClause  ::=  'SELECT' ( 'DISTINCT' | 'REDUCED' )? ( ( Var | ( '(' Expression 'AS' Var ')' ) )+ | ('*'  ( '(' Expression 'AS' Var ')' )* ) )

Or no?

However, on the other hand, something like

 SELECT * (COUNT(*) AS ?Var) 

looks a bit weird, as the two '*' here refer to different sets of variables... so, I can live without it.

Axel








However, as mentioned in the original mail, I can live without it.



On 14 Oct 2010, at 09:18, Lee Feigenbaum wrote:

> On 10/14/2010 6:35 AM, Axel Polleres wrote:
> > For clarification, another thing: BTW, what now about combining * with project expressions?
> >    SELECT * (expr AS ?newVar)
> > would seem convenient to simply extend a binding, but the current grammar forbids this.
> 
> I'm pretty sure we've discussed this in the past and agreed that SELECT
> * is a convenient abbreviation but that we don't need this extra
> complication in the grammar.
> 
> > Anyways, we actually don't need it if we have BIND with exactly this behaviour, yes?
> > So, given we have BIND, I can live without the possiblity to "extend" "SELECT *",
> > just wanted to note this.
> 
> Well, you could do it easily enough without BIND anyway; it's just an
> extra shortcut.
> 
> Lee
> >
> >
> > best,
> > Axel
> >
> >
> >
> 
Received on Thursday, 14 October 2010 12:34:04 GMT

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