- From: Steve Harris <steve.harris@garlik.com>
- Date: Fri, 5 Mar 2010 14:35:43 +0000
- To: Ivan Herman <ivan@w3.org>
- Cc: Andy Seaborne <andy.seaborne@talis.com>, sparql Working Group <public-rdf-dawg@w3.org>
On 5 Mar 2010, at 14:04, Ivan Herman wrote:
> On 2010-3-5 11:56 , Steve Harris wrote:
>> On 5 Mar 2010, at 08:02, Ivan Herman wrote:
>>
>> Actually, naively I'd expect {?x foaf:knows{2} ?y} to do the same
>> as {?x
>> foaf:knows ?tmp . ?tmp foaf:knows ?y}. On the other hand, I suppose
>> people might not care about cardinality in the property path case?
>> Not
>> strong feelings I guess.
>>
>> What does this do to list handling though? If you have
>> :x :p (1 2 2 3) .
>> and
>> { :x rdf:rest*/rdf:first ?y } [or whatever the right combo is]
>> won't you get
>> ?y = 1, 2, 3
>> as a result?
>>
>
> Ouch. You got me there:-(
Thinking on this some more I don't see why path expressions should
reduce cardinality implicitly, when the rest of SPARQL doesn't? You
can use DISTINCT/REDUCED if you want that, a subquery may be necessary
in some cases though.
Maybe there's a good usecase, or example of why this is preferable? I
don't have any user or implementation experience to go by I'm afraid.
If it's to avoid things like { ?x foaf:knows{3} y } returning loads of
duplicates, then a DISTINCT subquery doesn't seem too onerous. I can
tell you from experience that you're going to want a LIMIT in there
anyway :)
- Steve
--
Steve Harris, Garlik Limited
2 Sheen Road, Richmond, TW9 1AE, UK
+44 20 8973 2465 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 Friday, 5 March 2010 14:36:12 UTC