[ https://issues.apache.org/jira/browse/JENA-1778?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andy Seaborne resolved JENA-1778. --------------------------------- Fix Version/s: Jena 3.14.0 Resolution: Fixed > 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 > Fix For: Jena 3.14.0 > > 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)