My understanding is that LIMIT applies to the number of solutions returned
not the number of RDF triples, generating triples for a CONSTRUCT/DESCRIBE
is a post-processing step that occurs after the query has been evaluated
to a solution set.
So in the case of a DESCRIBE with LIMIT 5 you would get the descriptions
of the first 5 solutions e.g.
DESCRIBE ?x WHER { ?x a ex:SomeType } LIMIT
Gives the descriptions of the first 5 values found for ?x
In the case of the CONSTRUCT with LIMIT 5 you would get the results of
applying the template to the first 5 solutions e.g.
CONSTRUCT { ?x foaf:knows ?y . ?y foaf:knows ?x } WHERE { ?x foaf:knows ?y
} LIMIT 5
Gives 10 triples because you're generating 2 triples for each solution
If this is not the behavior you are seeing then please go ahead and file a
bug with a minimal test case that demonstrates the issue.
Rob
On 10/2/12 2:21 PM, "Damian Steer" <[email protected]> wrote:
>
>On 2 Oct 2012, at 22:08, Simon Helsen <[email protected]> wrote:
>
>> Hi guys,
>>
>> given that some of you are well versed in the sparql spec, could any of
>> you shed some light on what the expected behavior is when a DESCRIBE
>>query
>> has a LIMIT clause? It seems that in Jena/TDB the LIMIT clause is
>>simply
>> ignored. But arguably the LIMIT could apply on the number of resources
>>to
>> consider.
>
>Are you sure the LIMIT clause is ignored?
>
>From [1]
>
>"The DESCRIBE form takes *each of the resources identified in a
>solution*, together with any resources directly named by IRI, and
>assembles a single RDF graph by taking a "description" which can come
>from any information available including the target RDF Dataset."
>
>(emphasis mine)
>
>The relation between the LIMIT value and the size of the resulting model
>is a lower bound, I suppose.
>
>Damian
>
>[1] <http://www.w3.org/TR/rdf-sparql-query/#describe>