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

Re: what functions should we include in SPARQL 1.1?

From: Steve Harris <steve.harris@garlik.com>
Date: Wed, 3 Nov 2010 06:56:54 +0000
Message-Id: <23D2926D-577B-41EF-867E-A3706C6C7BA6@garlik.com>
Cc: Lee Feigenbaum <lee@thefigtrees.net>, SPARQL Working Group <public-rdf-dawg@w3.org>
To: Paul Gearon <gearon@ieee.org>
On 3 Nov 2010, at 00:46, Paul Gearon <gearon@ieee.org> wrote:

> On Tue, Nov 2, 2010 at 6:25 PM, Steve Harris <steve.harris@garlik.com> wrote:
>> It's not in XPath (as far as I can tell), but I'd like a RAND() function, it's incredibly useful, e.g.
>> 
>> SELECT ?s WHERE { ?s a <Foo> } ORDER BY RAND() LIMIT 10
>> 
>> SQL's RAND() returns a floating point number between 0 and 1, which works fine. You can also pass it a constant seed value as an argument, but that always struck me as a bit of a strange way of doing it.
> 
> Random seeds are useful for unit tests. You get essentially random,
> but deterministic, results.

Sure, I wasn't arguing against being able to seed, just SQL's syntax, which is unhelpful. 

- Steve
Received on Wednesday, 3 November 2010 06:57:38 GMT

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