Re: another aggregates test case...

On 08/06/2010 3:12 PM, Lee Feigenbaum wrote:
> On 6/8/2010 10:04 AM, Andy Seaborne wrote:
>> I don't see why it needs to be an error - with no aggregation GROUP BY
>> can be considered to be a a partial sort. Cardinality same as without
>> GROUP BY. This also happens to be a requirement in some apps - results
>> clustered by key but the same number of rows as without grouping.
>> Sorting can make it so, but sorting is potentially more expensive.
> This sounds like a pretty different model of aggregation then we have
> now. (Actually sounds similar to the model that was proposed on the
> comments list a few months ago.) If we went this way, why not do this
> all the time, and just repeat the values for the aggregate calculations?
> I prefer to keep the existing aggregate model.
> Lee

I'm not happy with the error case when GROUP BY is used and no aggregate 
is explicitly mentioned.

To keep as close to the model as far as it is currently defined, I would 
be happy with the "null aggregation" case (reduced to a table of keys, 
no aggregate column added, keys are projectable).

Seems useful in developing queries and makes aggregation reasonably 
orthogonal to grouping.

SELECT * means all the keys (i.e. variables in scope after grouping)


Received on Tuesday, 8 June 2010 15:54:49 UTC