Re: Order of evaluation for aggregates

On 15/11/11 12:44, Steve Harris wrote:
> Many thanks Birte.
>
> OK, of these I suspect that changing the substitution to (SAMPLE(?x) AS ?x) will mean the least changes.

As syntax, (SAMPLE(?x) AS ?x) isn't legal because AS has to introduce a 
new variable. This happens in SELECT expression processing a few 
subsections.


There is no definition of "Aggregation".  It's mentioned in 11.2 but the 
link goes to "Definition: Evaluation of Aggregation".  There should a 
definition (just after group?) in 18.4.

I looked because I wondered if we could just have an "?x" as the 
"aggregate".  But I think, as Birte shows, as because it's done by 
syntactic rewriting, just leaving it as "?x" would work.

> I wanted to convert the plain ?x projection to an aggregate so it was consistent with the rest of the projections, but expressing it explicitly would be equivalent I think.
>
> I will have a run through the aggregation text and see if I can make that change with a relatively small change to the document.
>
> Cheers,
>     Steve

I also noticed;

[[
Definition: Evaluation of AggregateJoin
...
Note that if eval(D(G), Ai) is an error, it is ignored.
]]

  An error causes an error doesn't it?  (AS causes it to be unbound)

	Andy

Received on Tuesday, 15 November 2011 17:12:49 UTC