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

Re: Evaluation of aggregates (was: Re: isNumeric)

From: Axel Polleres <axel.polleres@deri.org>
Date: Mon, 20 Sep 2010 12:30:01 +0200
Cc: SPARQL Working Group <public-rdf-dawg@w3.org>
Message-Id: <D59EDBD9-44D1-4E88-B0C1-4053C0008255@deri.org>
To: "Andy Seaborne" <andy.seaborne@epimorphics.com>
On 20 Sep 2010, at 12:09, Andy Seaborne wrote:

> >> to make the check happen before the aggregate is called.
> > FILTER(false) }
> > What does that change? if X is a string, then ?X + 0 gives an error, doesn't it?
> > (at least it did when I tried it with XQuery)
> 
> It changes where the error occurs.  For "+0" the error occurs the
> aggregation step and that one error is skipped by EvaListE.
> 
> Otherwise it passes to op:numeric-add where it's a propagating error and
> the whole group is an error.
> 
> I find that inconsistent.

ok, got that... your understanding makes sense to me now, though 
I find the ?X+0 still look a bit "hacky".

> 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.

Axel
Received on Monday, 20 September 2010 10:30:37 GMT

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