You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "Andy Seaborne (JIRA)" <ji...@apache.org> on 2015/09/22 14:14:04 UTC

[jira] [Resolved] (JENA-1021) Odd MINUS behavior in a UNION

     [ https://issues.apache.org/jira/browse/JENA-1021?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andy Seaborne resolved JENA-1021.
---------------------------------
       Resolution: Fixed
    Fix Version/s: Jena 3.0.1

> 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
>            Assignee: Andy Seaborne
>             Fix For: Jena 3.0.1
>
>
> 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)