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

Andy Seaborne resolved JENA-79.
-------------------------------

    Resolution: Fixed

Thanks for the complete bug report.

Fixed in the latest development build:
http://www.openjena.org/repo-dev/com/hp/hpl/jena/arq/

> Wrong query result when FILTERing an unbound variable
> -----------------------------------------------------
>
>                 Key: JENA-79
>                 URL: https://issues.apache.org/jira/browse/JENA-79
>             Project: Jena
>          Issue Type: Bug
>          Components: ARQ
>         Environment: ARQ-2.8.8 / Sun Java SE 6
>            Reporter: Giovanni Mels
>              Labels: filter, optional, unbound
>
> Consider the graph:
> {code}
> @prefix ex: <http://example.com/ns#>.
> ex:subject a ex:Class.
> {code}
> and the query
> {code}
> PREFIX ex: <http://example.com/ns#>
> SELECT ?x WHERE {
>   ?s a ?c
>   OPTIONAL { ?s ex:property ?x }
>   FILTER (?x = ex:v)
> }
> {code}
> Executing the query on the graph should return no solutions (?x is unbound, 
> so the filter evaluates to 'error'). But I get the result:
> {code}
> -----------------------------
> | x                         |
> =============================
> | <http://example.com/ns#v> |
> -----------------------------
> {code}
> When changing the query to filter on a literal (?x = "string") or (?x = 1), 
> the query returns no results. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to