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

Wrong results/performance regression when using BIND and graph pattern groups

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Jena 3.1.0, Fuseki 2.4.0
    • Jena 3.1.1
    • ARQ
    • None

    Description

      I've been using SPARQL queries with BINDs and/or VALUESs that precede UNION blocks. These used to work efficiently (at least in Jena 2 times) with the bound value being bound also in the subpattern, but no longer do. In addition, at certain times, they produce nonsensical results. For example, the below returns rdf:type statements in the dataset without any regard to ?cl:

      SELECT * {
        {
          BIND("nonexistant" AS ?cl)
          {
            BIND(?cl AS ?cl2)
            ?c a ?cl2 .
          } UNION {
            BIND(?cl AS ?cl2)
            ?c a ?cl2 .
          }
        }
      }
      LIMIT 10
      

      while if you change just one of the subpatterns in the union to directly refer to ?cl, it returns an empty result set:

      SELECT * {
        {
          BIND("nonexistant" AS ?cl)
          {
            BIND(?cl AS ?cl2)
            ?c a ?cl .
          } UNION {
            BIND(?cl AS ?cl2)
            ?c a ?cl2 .
          }
        }
      }
      LIMIT 10
      

      Attachments

        Activity

          People

            andy Andy Seaborne
            jiemakel Eetu Mäkelä
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: