Re: another question on "SELECT *"

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 UTC