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

Graph filter works on different graph that selected one

    Details

      Description

      Give following trig data:

      @prefix : <http://example.com/data/> .   
      @prefix base: <http://example.com/> .
      
      base:graph1
      {
      :person3                                                                                  
          a :Person ; 
          :age 3;                                                                     
          :name "Person 3 - graph1".
          
                                                                                        
      }
      
      base:graph2
      {
      :person3                                                                                  
          a :Person ; 
          :age 13;                                                                     
          :name "Person 3".
      }
      
      

      and the following query:

      PREFIX  rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
      PREFIX  rdfs: <http://www.w3.org/2000/01/rdf-schema#>
      PREFIX  xsd: <http://www.w3.org/2001/XMLSchema#>
      
      select  distinct ?ps ?p ?o
      where { 
              GRAPH <http://example.com/graph1>
              {
                      ?ps ?p ?o.
                      select ?ps
                      where  
                      {
                             ?ps a  <http://example.com/data/Person>. 
                             ?ps <http://example.com/data/age> ?age.
                              filter(?age >3)
                      }
                      order by desc(?age)
                      #LIMIT 1
              }
      
      }
      order by ?ps
      

      The query displays person in graph 1 (so ignores the filter > 3) but somehow filters the person in graph2, meaning when changing "?age >13" (?age>graph 2 person age) displays no results.

        Activity

        Hide
        michaelschmidt michaelschmidt added a comment -

        Resolved in branch quads_issues. The problem was that the triple patterns inside the SELECT subquery did not inherit the graph context, but were evaluated over the DEFAULT_CONTEXT. This was an issue while translating the Sesame parse tree into a bigdata AST.

        Executed CI, looks good. Issuing pull request.

        Show
        michaelschmidt michaelschmidt added a comment - Resolved in branch quads_issues. The problem was that the triple patterns inside the SELECT subquery did not inherit the graph context, but were evaluated over the DEFAULT_CONTEXT. This was an issue while translating the Sesame parse tree into a bigdata AST. Executed CI, looks good. Issuing pull request.
        Hide
        michaelschmidt michaelschmidt added a comment -

        Merged branch into master, closing issue.

        Show
        michaelschmidt michaelschmidt added a comment - Merged branch into master, closing issue.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: