You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "Stephen Allen (Created) (JIRA)" <ji...@apache.org> on 2012/04/02 04:54:28 UTC
[jira] [Created] (JENA-229) "SELECT DISTINCT * " produces
duplicates when blank nodes are used the graph pattern
"SELECT DISTINCT * " produces duplicates when blank nodes are used the graph pattern
------------------------------------------------------------------------------------
Key: JENA-229
URL: https://issues.apache.org/jira/browse/JENA-229
Project: Apache Jena
Issue Type: Bug
Components: ARQ
Affects Versions: ARQ 2.9.0, ARQ 2.9.1
Reporter: Stephen Allen
Priority: Minor
When using a blank node in the graph pattern of a query, using "select distinct *" can result in duplicate rows. There is a similar issue with "select reduced *"
Steps to reproduce:
1) Load the "books" database [1]
2) Add an additional statement [2]
3) Run the following query:
PREFIX books: <http://example.org/book/>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
select distinct *
where {
?book dc:title ?title .
?book dc:creator [] .
}
You see that you get a duplicate result for book5.
If you change the query to:
PREFIX books: <http://example.org/book/>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
select distinct ?book ?title
where {
?book dc:title ?title .
?book dc:creator [] .
}
You do not get duplicates.
[1] http://svn.apache.org/repos/asf/incubator/jena/Jena2/Fuseki/trunk/Data/books.ttl
[2] <http://example.org/book/book5> <http://purl.org/dc/elements/1.1/creator> "Sir Example" .
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (JENA-229) "SELECT DISTINCT * " produces
duplicates when blank nodes are used the graph pattern
Posted by "Andy Seaborne (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JENA-229?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13244032#comment-13244032 ]
Andy Seaborne commented on JENA-229:
------------------------------------
Is this JENA-211?
I tried to recreate this on the current development system but can't.
I don't get a duplicate with ARQ 2.9.1 / I do with ARQ 2.9.0.
What is the output of "arq.sparql --version" for the ARQ 2.9.1 you are using?
Simpler test case:
@prefix : <http://example/> .
:a :p :b .
:a :p :c .
Query:
SELECT DISTINCT * { ?a ?x [] }
I get different behavior between ARQ 2.9.0 (wrong) and current 2.9.1 (right).
(and ARQ 2.8.X's are wrong as well).
> "SELECT DISTINCT * " produces duplicates when blank nodes are used the graph pattern
> ------------------------------------------------------------------------------------
>
> Key: JENA-229
> URL: https://issues.apache.org/jira/browse/JENA-229
> Project: Apache Jena
> Issue Type: Bug
> Components: ARQ
> Affects Versions: ARQ 2.9.0, ARQ 2.9.1
> Reporter: Stephen Allen
> Priority: Minor
>
> When using a blank node in the graph pattern of a query, using "select distinct *" can result in duplicate rows. There is a similar issue with "select reduced *"
> Steps to reproduce:
> 1) Load the "books" database [1]
> 2) Add an additional statement [2]
> 3) Run the following query:
> PREFIX books: <http://example.org/book/>
> PREFIX dc: <http://purl.org/dc/elements/1.1/>
> select distinct *
> where {
> ?book dc:title ?title .
> ?book dc:creator [] .
> }
> You see that you get a duplicate result for book5.
> If you change the query to:
> PREFIX books: <http://example.org/book/>
> PREFIX dc: <http://purl.org/dc/elements/1.1/>
> select distinct ?book ?title
> where {
> ?book dc:title ?title .
> ?book dc:creator [] .
> }
> You do not get duplicates.
> [1] http://svn.apache.org/repos/asf/incubator/jena/Jena2/Fuseki/trunk/Data/books.ttl
> [2] <http://example.org/book/book5> <http://purl.org/dc/elements/1.1/creator> "Sir Example" .
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Closed] (JENA-229) "SELECT DISTINCT * " produces duplicates
when blank nodes are used the graph pattern
Posted by "Stephen Allen (Closed) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JENA-229?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stephen Allen closed JENA-229.
------------------------------
Resolution: Duplicate
Fix Version/s: ARQ 2.9.1
Yes, this is a duplicate of JENA-211. I erroneously thought I was testing against 2.9.1, when in fact I was using 2.9.0. It works correctly in 2.9.1.
> "SELECT DISTINCT * " produces duplicates when blank nodes are used the graph pattern
> ------------------------------------------------------------------------------------
>
> Key: JENA-229
> URL: https://issues.apache.org/jira/browse/JENA-229
> Project: Apache Jena
> Issue Type: Bug
> Components: ARQ
> Affects Versions: ARQ 2.9.0, ARQ 2.9.1
> Reporter: Stephen Allen
> Priority: Minor
> Fix For: ARQ 2.9.1
>
>
> When using a blank node in the graph pattern of a query, using "select distinct *" can result in duplicate rows. There is a similar issue with "select reduced *"
> Steps to reproduce:
> 1) Load the "books" database [1]
> 2) Add an additional statement [2]
> 3) Run the following query:
> PREFIX books: <http://example.org/book/>
> PREFIX dc: <http://purl.org/dc/elements/1.1/>
> select distinct *
> where {
> ?book dc:title ?title .
> ?book dc:creator [] .
> }
> You see that you get a duplicate result for book5.
> If you change the query to:
> PREFIX books: <http://example.org/book/>
> PREFIX dc: <http://purl.org/dc/elements/1.1/>
> select distinct ?book ?title
> where {
> ?book dc:title ?title .
> ?book dc:creator [] .
> }
> You do not get duplicates.
> [1] http://svn.apache.org/repos/asf/incubator/jena/Jena2/Fuseki/trunk/Data/books.ttl
> [2] <http://example.org/book/book5> <http://purl.org/dc/elements/1.1/creator> "Sir Example" .
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira