[ 
https://issues.apache.org/jira/browse/JENA-587?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13820038#comment-13820038
 ] 

Andy Seaborne commented on JENA-587:
------------------------------------

Slight stronger condition - if all the {{DISTINCT}} variables appear in {{ORDER 
BY}} and also only those variables. {{DISTINCT ?v ORDER BY ?v}} and {{DISTINCT 
?v ?w ORDER BY ?v ?w}}

The order in {{ORDER BY}} matters. {{DISTINCT ?v ORDER BY ?v ?w}} is OK but 
reversing v and ?w {{DISTINCT ?v ORDER BY ?w ?v}} is not because the sorting on 
?w first scrambles the ?v adjacency needed by {{REDUCED}}

Shall we disable the optimization in trunk for now to give space to think about 
it?  Better slow/correct than fast/incorrect.


> SELECT DISTINCT returns duplicate results
> -----------------------------------------
>
>                 Key: JENA-587
>                 URL: https://issues.apache.org/jira/browse/JENA-587
>             Project: Apache Jena
>          Issue Type: Bug
>          Components: ARQ
>    Affects Versions: Jena 2.11.0
>            Reporter: Veyriere
>         Attachments: D.ttl, Q.rq, bug Jena2.11.0.zip, jena-587.zip
>
>
> SELECT DISTINCT returns duplicate results. Attaching a small quads dump and 
> the query to reproduce with TDB
> Reproduced with Jena 2.11.0 and Jena 2.10.1 (was working with 2.7.4)



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to