Uploaded image for project: 'Blazegraph (by SYSTAP)'
  1. Blazegraph (by SYSTAP)
  2. BLZG-827

Inconsistent treatment of bind and optional property path

    XMLWordPrintable

    Details

      Description

      The following 2 queries should return equivalent data, but the 2nd version does not return data on identical database contents. The only difference is that the 2nd version uses a BIND to a variable, while the 1st version directly substitutes the IRI into the query. Of note is that the query involves an optional property path "syapse:part?".

      It might relate to trac734. I have a workaround by performing direct substitution, but this still would be nice to fix.

      Jeremy Carroll has said he will work on this. Actually found in BIGDATA_RELEASE_1_3_0, at r7390.

      This query works:
      --
      BASE <http://localhost:8000/>
      PREFIX base: </bdm/api/kbobject/base:>
      PREFIX based: </bdm/api/appindividual/based:>
      PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
      PREFIX syapse: </graph/syapse#>
      SELECT *
      FROM </graph/stoogesInc/abox>
      FROM </graph/ontology/base>
      WHERE {
      ?referrer syapse:part? ?part .
      ?part ?predicate based:Protocol_113 .
      }
      LIMIT 1000

      This query doesn't work (returns no results):
      --
      BASE <http://localhost:8000/>
      PREFIX base: </bdm/api/kbobject/base:>
      PREFIX based: </bdm/api/appindividual/based:>
      PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
      PREFIX syapse: </graph/syapse#>
      SELECT *
      FROM </graph/stoogesInc/abox>
      FROM </graph/ontology/base>
      WHERE {
      BIND(based:Protocol_113 as ?s)
      ?referrer syapse:part? ?part .
      ?part ?predicate ?s .
      }
      LIMIT 1000

        Attachments

          Activity

            People

            Assignee:
            jeremycarroll jeremycarroll
            Reporter:
            mbarrien mbarrien
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: