Uploaded image for project: 'Apache Jena'
  1. Apache Jena
  2. JENA-79

Wrong query result when FILTERing an unbound variable

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Done
    • None
    • Jena 2.11.0
    • ARQ
    • ARQ-2.8.8 / Sun Java SE 6

    Description

      Consider the graph:

      @prefix ex: <http://example.com/ns#>.
      
      ex:subject a ex:Class.
      

      and the query

      PREFIX ex: <http://example.com/ns#>
      SELECT ?x WHERE {
        ?s a ?c
        OPTIONAL { ?s ex:property ?x }
        FILTER (?x = ex:v)
      }
      

      Executing the query on the graph should return no solutions (?x is unbound, so the filter evaluates to 'error'). But I get the result:

      -----------------------------
      | x                         |
      =============================
      | <http://example.com/ns#v> |
      -----------------------------
      

      When changing the query to filter on a literal (?x = "string") or (?x = 1), the query returns no results.

      Attachments

        Activity

          People

            andy Andy Seaborne
            gmels Giovanni Mels
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: