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

hint:runFirst not considered for Subqueries and Named Subquery Includes

    Details

      Description

      In the following two queries, the runFirst query hint has no effect:

      SELECT *
      WHERE { 
        {
          SELECT ?s WHERE {
            ?s <http://p1> <http://o1a> .
          }
        }
        hint:Prior hint:runFirst "true" .
        ?s <http://p2> ?p2 .
        ?s <http://p3> ?p3 .  
      }
      

      and

      SELECT *
      WHERE { 
        {
          SELECT ?s WHERE {
            ?s <http://p1> <http://o1a> .
          } LIMIT 1
        }
        hint:Prior hint:runFirst "true" .
        ?s <http://p2> ?p2 .
        ?s <http://p3> ?p3 .  
      }
      

      Note the first one translates to a subquery and the second one to a named subquery include. This seems to be a general defect (probably caused by the new join group optimizer).

        Activity

        Hide
        michaelschmidt michaelschmidt added a comment -

        Pushed test cases illustrating the problem to https://github.com/blazegraph/bigdata/compare/BLZG-4323.

        Show
        michaelschmidt michaelschmidt added a comment - Pushed test cases illustrating the problem to https://github.com/blazegraph/bigdata/compare/BLZG-4323 .
        Hide
        michaelschmidt michaelschmidt added a comment -

        Created PR https://github.com/blazegraph/bigdata/pull/501, running CI now.

        The problem was actually not in the new JoinGroupOrder optimizer, but that the ASTEmptyJoinGroupOptimizer did not properly propagate the runFirst/runLast annotations when eliminating wrapping join groups.

        bryanthompson please review once CI is clean

        Show
        michaelschmidt michaelschmidt added a comment - Created PR https://github.com/blazegraph/bigdata/pull/501 , running CI now. The problem was actually not in the new JoinGroupOrder optimizer, but that the ASTEmptyJoinGroupOptimizer did not properly propagate the runFirst/runLast annotations when eliminating wrapping join groups. bryanthompson please review once CI is clean
        Hide
        michaelschmidt michaelschmidt added a comment -

        Merged down upon review from Bryan. Brad Bebee can you please include this into the release and close the issue?

        Show
        michaelschmidt michaelschmidt added a comment - Merged down upon review from Bryan. Brad Bebee can you please include this into the release and close the issue?

          People

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

            Dates

            • Created:
              Updated:
              Resolved: