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

Wrong results for fully constrained "+" property path

    Details

      Description

      Consider data

      <http://C1> rdfs:subClassOf <http://C2> .
      

      and query

      SELECT * WHERE {
        <http://C1> rdfs:subClassOf+  <http://C3> . 
        BIND(5 AS ?y)
      } 
      

      The query returns a result (i.e., ?y -> 5), although there's obviously no transitive subClassOf connection between C1 and C3 in the data. Accordingly, an ASK query

      ASK {
        <http://C1> rdfs:subClassOf+  <http://C3> . 
      } 
      

      returns true (instead of the expected result false), the reason being that the property path expression returns a single (empty) result item rather than no result. Note that the equivalent query

      SELECT * WHERE {
       <http://C1> rdfs:subClassOf+  ?x. 
        BIND(5 AS ?y)
       FILTER(?x = <http://C3>).
      } 
      

      gives no result as expected.

        Activity

        Hide
        michaelschmidt michaelschmidt added a comment - - edited
        Show
        michaelschmidt michaelschmidt added a comment - - edited See also https://jira.blazegraph.com/browse/BLZG-2085 .
        Hide
        michaelschmidt michaelschmidt added a comment -

        The problem was that in the starting solutions that we injected into the ALP iteration, the constant binding for the output variable was missing. The fix is simply to add it, if missing.

        See https://github.com/blazegraph/bigdata/pull/489 for a proposed fix, running through CI now.

        Show
        michaelschmidt michaelschmidt added a comment - The problem was that in the starting solutions that we injected into the ALP iteration, the constant binding for the output variable was missing. The fix is simply to add it, if missing. See https://github.com/blazegraph/bigdata/pull/489 for a proposed fix, running through CI now.
        Hide
        beebs Brad Bebee added a comment -

        Cherry-picked into 2.1.5.

        Show
        beebs Brad Bebee added a comment - Cherry-picked into 2.1.5.

          People

          • Assignee:
            michaelschmidt michaelschmidt
            Reporter:
            michaelschmidt michaelschmidt
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: