[ https://issues.apache.org/jira/browse/JENA-1778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16975069#comment-16975069 ]
ASF subversion and git services commented on JENA-1778: ------------------------------------------------------- Commit bed564bf777b74d272424bcd6595a504d830db37 in jena's branch refs/heads/master from Andy Seaborne [ https://gitbox.apache.org/repos/asf?p=jena.git;h=bed564b ] Merge pull request #630 from afs/jena1778-distinct JENA-1778: Hide system vars in COUNT(DISTINCT *) > COUNT(DISTINCT *) can generate incorrect results. > ------------------------------------------------- > > Key: JENA-1778 > URL: https://issues.apache.org/jira/browse/JENA-1778 > Project: Apache Jena > Issue Type: Bug > Components: ARQ > Affects Versions: Jena 3.13.1 > Reporter: Simon Fell > Assignee: Andy Seaborne > Priority: Minor > Time Spent: 20m > Remaining Estimate: 0h > > Using COUNT(DISTINCT *) appears to generate the wrong result, in that it > appears to include system generated bindings as part of the solution when > DISTINCTing them. (I think similar to the issue in JENA-211). > For example, I'd expect these 2 queries to return the same results, as ?lbl > should be the only variable considered part of the solutions. > {code:java} > SELECT (COUNT(DISTINCT *) as ?c) > WHERE { <child3> <p>+/<label> ?lbl } > {code} > {code:java} > SELECT (COUNT(DISTINCT ?lbl) as ?c) > WHERE { <child3> <p>+/<label> ?lbl } > {code} > > However these return different results. A full simple repro case is available > at https://github.com/superfell/jena-count-distinct-star > -- This message was sent by Atlassian Jira (v8.3.4#803005)