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

Computation of maybe and definitely incoming bindings in subqueries

    Details

      Description

      Currently, in subqueries the calculation of maybe and definitely incoming bindings does not work properly. The problem here is that ?o is added to the exogeneous variable, and these exogeneous variables are always injected when calculating these variable sets. For subqueries, they should not be injected though, as they open a fresh scope.

      SELECT * WHERE {
        {
          SELECT ?s WHERE {
            ?s ?p ?o .
            FILTER(?o=<http://o2>)
          }
        }
      } VALUES ?o { <http://o> }
      

        Activity

        Hide
        michaelschmidt michaelschmidt added a comment -

        Fixed in branch bindings-refactor, added ticket as a test case. Just re-running govtrack to get hints on performance regressions, once this succeeds the branch will be merged into master.

        The fix was part of a major refactoring. The prior optimizers ASTSimpleBindingsOptimizer, ASTValuesOptimizer, and ASTBindingsAssigner were retired, and custom code for extracting static bindings (outside of optimizers) was eliminated. All cases were generalized in the ASTStaticBindingsOptimizer, which analyzes the query to detect statically derivable bindings introduced via constructs (such as BIND/VALUES, FILTER with sameTerm, IN or term equality over URIs). These bindings are pulled out to the top-level clause where valid (according to the bottom up semantics) and inlines them at various positions. The refactoring is backed by a broad set of test cases, including both SPARQL level and AST level tests.

        Show
        michaelschmidt michaelschmidt added a comment - Fixed in branch bindings-refactor, added ticket as a test case. Just re-running govtrack to get hints on performance regressions, once this succeeds the branch will be merged into master. The fix was part of a major refactoring. The prior optimizers ASTSimpleBindingsOptimizer, ASTValuesOptimizer, and ASTBindingsAssigner were retired, and custom code for extracting static bindings (outside of optimizers) was eliminated. All cases were generalized in the ASTStaticBindingsOptimizer, which analyzes the query to detect statically derivable bindings introduced via constructs (such as BIND/VALUES, FILTER with sameTerm, IN or term equality over URIs). These bindings are pulled out to the top-level clause where valid (according to the bottom up semantics) and inlines them at various positions. The refactoring is backed by a broad set of test cases, including both SPARQL level and AST level tests.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: