Re: what functions should we include in SPARQL 1.1?

On 11/7/2010 12:55 PM, Axel Polleres wrote:
> Just to state that (even if we consider RAND() useful, I am not 100% sure whether i like the example.
>
>   SELECT ?s WHERE { ?s a<Foo>  } ORDER BY RAND() LIMIT 10
>
> Strictly speaking this has precisely the same semantics as
>
>   SELECT ?s WHERE { ?s a<Foo>  } LIMIT 10
>
> i.e. the order is not prescribed if no ORDER BY is given.
> I know that *for specific implementations* (probably most) the result of two consecutive calls of the former version may be different, whereas
> two consecutive calls of the latter might not, but I don't think that we should - by such example - indicate that this is intended by the spec
> and that this is a way which guarantees random results. Opinions?

Yes, I share this thought. I have no a priori objection to RAND() but 
had the same reaction that this particular example can be pretty 
misleading as to what the meaning of the same query without ORDER BY 
RAND() is.

Lee

>
> Axel
>
> On 3 Nov 2010, at 06:25, Steve Harris 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.
>>
>> - Steve
>>
>> On 2010-11-02, at 21:16, Lee Feigenbaum wrote:
>>
>>> (This email discharges my ACTION-305, http://www.w3.org/2009/sparql/track/actions/305)
>>>
>>> Two months ago we all agreed that we want to move forward with the function library work, and we agreed that we need two things:
>>>
>>> 1) A set of functions to include
>>> 2) URIs for these functions
>>>
>>> This email is to begin a discussion #1 above. AndyS already did much of this work on the wiki page, so I'm pretty much transplanting that here for discussion. Please reply with either concurrence, suggestions&  reasons for things to remove or suggestions&  reasons for additional things to include.
>>>
>>> This references functions from http://www.w3.org/TR/xpath-functions/ .
>>>
>>>
>>> Numeric functions:
>>>
>>>       6.4.1 fn:abs
>>>       6.4.2 fn:ceiling
>>>       6.4.3 fn:floor
>>>       6.4.4 fn:round
>>>       6.4.5 fn:round-half-to-even
>>>
>>> String functions:
>>>
>>>       7.3.2 fn:compare
>>>       7.4.1 fn:concat
>>>       7.4.3 fn:substring
>>>       7.4.4 fn:string-length
>>>       7.4.7 fn:upper-case
>>>       7.4.8 fn:lower-case
>>>       7.4.10 fn:encode-for-uri
>>>       7.5.1 fn:contains     (collation form optional)
>>>       7.5.2 fn:starts-with
>>>       7.5.3 fn:ends-with
>>>
>>> DateTime functions:
>>>
>>>       10.4.6 op:dateTime-equal
>>>       10.4.7 op:dateTime-less-than
>>>       10.4.8 op:dateTime-greater-than
>>>       10.5.7 fn:year-from-dateTime
>>>       10.5.8 fn:month-from-dateTime
>>>       10.5.9 fn:day-from-dateTime
>>>       10.5.10 fn:hours-from-dateTime
>>>       10.5.11 fn:minutes-from-dateTime
>>>       10.5.12 fn:seconds-from-dateTime
>>>       10.5.13 fn:timezone-from-dateTime
>>>
>>> Misc functions:
>>>
>>> 	3. fn:error
>>>
>>>
>>> Lee
>>>
>>>
>>>
>>
>> --
>> Steve Harris, CTO, Garlik Limited
>> 1-3 Halford Road, Richmond, TW10 6AW, UK
>> +44 20 8439 8203  http://www.garlik.com/
>> Registered in England and Wales 535 7233 VAT # 849 0517 11
>> Registered office: Thames House, Portsmouth Road, Esher, Surrey, KT10 9AD
>>
>>
>
>

Received on Monday, 8 November 2010 05:56:45 UTC