Re: Unexpected DISTINCT?

On  27 Mar 2007, at 12:37 PM, Lee Feigenbaum wrote:

> Note that the REDUCED keyword is an at-risk feature in the current  
> Last
> Call draft that can modify the cardinalities of solutions within the
> solution sequence. It is defined in
> http://www.w3.org/TR/rdf-sparql-query/#modReduced .

Lee,
   A request for clarification.

   I presume (but do not know for sure) that results that the  
implementation has completely refined (as permitted by REDUCED) count  
as distinct for the purposes of output (REDUCED does not appear in  
[1]). This would be the case if an implementation interprets REDUCED  
as DISTINCT.

   I similarly presume that if the results are equivalent to those of  
the same query without DISTINCT or REDUCED (i.e., that no refinement  
has occurred; the implementation ignores REDUCED), then the  
implementation should not assert distinctness in the results.

   However:

"The cardinality of any set of variable bindings in an REDUCED  
solution set is at least one and not more than the cardinality of the  
solution set with no DISTINCT or REDUCED modifier."

   Let us assume that a query produces one row of bindings with  
DISTINCT, and nine identical rows without. With REDUCED, five  
identical rows are produced. This is acceptable according to my  
interpretation of the above text.

   Is the correct output:

<results ordered="false" distinct="false">

   or

<results ordered="false" distinct="true">

   ?

   Many thanks,

-R

[1] <http://www.w3.org/TR/rdf-sparql-XMLres/>

Received on Wednesday, 28 March 2007 06:36:44 UTC