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

Re: Evaluation of aggregates

From: Andy Seaborne <andy.seaborne@epimorphics.com>
Date: Mon, 20 Sep 2010 14:23:33 +0100
Message-ID: <4C976055.1070504@epimorphics.com>
To: Axel Polleres <axel.polleres@deri.org>
CC: SPARQL Working Group <public-rdf-dawg@w3.org>


On 20/09/10 11:30, Axel Polleres wrote:
>> >  Just define:
>> >  Sum(S) = op:numeric-add(S0, Sum(S1..n)) when|S|  >  1 if S0 is a number
>> >  Sum(S) = op:numeric-add(0, Sum(S1..n)) when|S|  >  1 if S0 is not a number
> is not as straightforward as Flatten op:numeric-add, but could be an option.
>

I don't understand that. The flatten operation is independent of the 
specific aggregation - it doesn't remove non-numbers:

[[
Definition: Flatten

The Flatten(M) function takes a multiset of lists, M {(L1, L2, ...), 
...}, and returns the multiset given by the multiset union of { Li | L 
in M } for all i in L.
]]

Could be changed to take a condition on the members produced.

Avg() works if Sum() does.

	Andy
Received on Monday, 20 September 2010 13:24:14 GMT

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