Uploaded image for project: 'Apache Jena'
  1. Apache Jena
  2. JENA-471

Regression in Algebra.toQuadForm() for nested sub-query with GRAPH clause

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Jena 2.10.1
    • Fix Version/s: Jena 2.11.0
    • Component/s: ARQ
    • Labels:
      None

      Description

      Our internal testing has flagged up a regression in behaviour between 2.10.0 and 2.10.1 with regards to Algebra.toQuadForm() when applied to sub-queries nested within a GRAPH clause

      The query in question is as follows:

      SELECT ?x 
      WHERE 
        { GRAPH ?g 
            { { SELECT ?x 
                WHERE 
                  { ?x ?p ?g } 
              } 
            } 
        } 
      

      With 2.10.0 this produced the following algebra:

      (project (?x)
        (project (?x)
          (quadpattern (quad ?g ?x ?p ?g))))
      

      With 2.10.1 this now produces an exception:

      com.hp.hpl.jena.sparql.ARQInternalErrorException
      	at com.hp.hpl.jena.sparql.algebra.OpVars$OpVarsPattern.visit(OpVars.java:197)
      	at com.hp.hpl.jena.sparql.algebra.op.OpProject.visit(OpProject.java:48)
      	at com.hp.hpl.jena.sparql.algebra.OpWalker$WalkerVisitor.visit1(OpWalker.java:86)
      	at com.hp.hpl.jena.sparql.algebra.OpVisitorByType.visitModifer(OpVisitorByType.java:42)
      	at com.hp.hpl.jena.sparql.algebra.OpVisitorByType.visit(OpVisitorByType.java:154)
      	at com.hp.hpl.jena.sparql.algebra.op.OpProject.visit(OpProject.java:48)
      	at com.hp.hpl.jena.sparql.algebra.OpWalker.walk(OpWalker.java:43)
      	at com.hp.hpl.jena.sparql.algebra.OpWalker.walk(OpWalker.java:33)
      	at com.hp.hpl.jena.sparql.algebra.OpVars.mentionedVars(OpVars.java:70)
      	at com.hp.hpl.jena.sparql.algebra.OpVars.mentionedVars(OpVars.java:62)
      	at com.hp.hpl.jena.sparql.algebra.AlgebraQuad$Pusher.visit(AlgebraQuad.java:93)
      	at com.hp.hpl.jena.sparql.algebra.op.OpGraph.visit(OpGraph.java:46)
      	at com.hp.hpl.jena.sparql.algebra.OpWalker$WalkerVisitor.before(OpWalker.java:64)
      	at com.hp.hpl.jena.sparql.algebra.OpWalker$WalkerVisitor.visit1(OpWalker.java:84)
      	at com.hp.hpl.jena.sparql.algebra.OpVisitorByType.visit(OpVisitorByType.java:110)
      	at com.hp.hpl.jena.sparql.algebra.op.OpGraph.visit(OpGraph.java:46)
      	at com.hp.hpl.jena.sparql.algebra.OpWalker$WalkerVisitor.visit1(OpWalker.java:85)
      	at com.hp.hpl.jena.sparql.algebra.OpVisitorByType.visitModifer(OpVisitorByType.java:42)
      	at com.hp.hpl.jena.sparql.algebra.OpVisitorByType.visit(OpVisitorByType.java:154)
      	at com.hp.hpl.jena.sparql.algebra.op.OpProject.visit(OpProject.java:48)
      	at com.hp.hpl.jena.sparql.algebra.OpWalker.walk(OpWalker.java:43)
      	at com.hp.hpl.jena.sparql.algebra.OpWalker.walk(OpWalker.java:38)
      	at com.hp.hpl.jena.sparql.algebra.Transformer.applyTransformation(Transformer.java:156)
      	at com.hp.hpl.jena.sparql.algebra.Transformer.transformation(Transformer.java:149)
      	at com.hp.hpl.jena.sparql.algebra.Transformer.transformation(Transformer.java:138)
      	at com.hp.hpl.jena.sparql.algebra.Transformer.transformation(Transformer.java:132)
      	at com.hp.hpl.jena.sparql.algebra.Transformer.transform(Transformer.java:57)
      	at com.hp.hpl.jena.sparql.algebra.Transformer.transformSkipService(Transformer.java:87)
      	at com.hp.hpl.jena.sparql.algebra.AlgebraQuad.quadize(AlgebraQuad.java:56)
      	at com.hp.hpl.jena.sparql.algebra.Algebra.toQuadForm(Algebra.java:89)
      

      I assume this regression happens because of the change to AlgebraQuad to use OpVars.mentionedVars() in the 2.10.1 dev cycle

      While the 2.10.0 algebra may have actually been incorrect it didn't throw a stack trace and I assume it is possible to make a valid quad transform on this algebra.

        Attachments

          Activity

            People

            • Assignee:
              andy Andy Seaborne
              Reporter:
              rvesse Rob Vesse
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: