William Tritchler created JENA-1021:
---------------------------------------
Summary: Odd MINUS behavior in a UNION
Key: JENA-1021
URL: https://issues.apache.org/jira/browse/JENA-1021
Project: Apache Jena
Issue Type: Bug
Components: Jena
Affects Versions: Jena 3.0.0
Reporter: William Tritchler
Given the sample data:
{code}
@prefix owl: <http://www.w3.org/2002/07/owl#>
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix : <http://no.such.org/test#> .
<urn:test:node1>
a :TestNode ;
rdfs:label "Node 1" .
<urn:test:node2>
a :TestNode ;
rdfs:label "Node 2" .
:TestNode
a owl:Class ;
rdfs:label "Test Node" .
{code}
When I run the union query:
{code}
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX app: <http://no.such.org/test#>
select distinct ?id where {
?id a app:TestNode .
{
?id rdfs:label "Node 1" .
minus { ?id a app:TestNode }
} union {
?id rdfs:label "Node 1" .
minus { ?id a app:TestNode }
}
}
{code}
*Observed:*
The query unexpectedly returns a single value: <urn:test:node1>
*Expected:*
The query should return no results.
Unless, of course, I'm totally off-base here. I suspect an issue, since
removing the union and having a single:
{code}
{
?id rdfs:label "Node 1" .
minus { ?id a app:TestNode }
}
{code} returns the expected empty result set.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)