Details

    • Type: Sub-task
    • Status: Done
    • Priority: Medium
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: BLAZEGRAPH_RELEASE_1_5_2
    • Component/s: None
    • Labels:
      None

      Description

      With a database containing the quad in data.nq, the following query returns the expected result:

      SELECT ?uri_d WHERE {
      VALUES ?type

      { <http://type1> }

      GRAPH <http://graph1>

      { ?uri_d <http://p> ?type . }

      }

      uri_d
      <http://subj>

      binding the graph in a second VALUES clause:

      SELECT ?uri_d WHERE {
      VALUES ?type

      { <http://type1> }

      VALUES ?vg

      { <http://graph1> }

      GRAPH ?vg

      { ?uri_d <http://p> ?type . }

      }

      returns no results. Binding the graph variable inside the first VALUES clause:

      SELECT ?uri_d WHERE {
      VALUES (?type ?vg)

      { (<http://type1> <http://graph1>) }

      GRAPH ?vg

      { ?uri_d <http://p> ?type . }

      }

      returns the expected result again.

      uri_d
      <http://subj>
      1. data.nq
        0.1 kB
        Lee Kitching

        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:
            michaelschmidt michaelschmidt
            Reporter:
            lkitching Lee Kitching
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: