- From: Steve Harris <steve.harris@garlik.com>
- Date: Wed, 3 Nov 2010 06:56:54 +0000
- To: Paul Gearon <gearon@ieee.org>
- Cc: Lee Feigenbaum <lee@thefigtrees.net>, SPARQL Working Group <public-rdf-dawg@w3.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 UTC