W3C home > Mailing lists > Public > public-rdf-dawg-comments@w3.org > March 2007

Re: Unexpected DISTINCT?

From: Richard Newman <rnewman@franz.com>
Date: Tue, 27 Mar 2007 23:36:32 -0700
Message-Id: <265D549A-ABD4-4933-B5F3-4C45B2F05EAC@franz.com>
Cc: public-rdf-dawg-comments@w3.org
To: Lee Feigenbaum <feigenbl@us.ibm.com>

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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:14:51 GMT