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

Rename.java lacks RDFStar support

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Jena 4.1.0
    • Jena 4.2.0
    • ARQ
    • None

    Description

      This is a follow up to JIRA-2107 (RDF Star performance issue with non-concrete node triples)

      The NodeTransformers in Rename.java lacks renaming of variables in RDFStar NodeTriples.
      A common side effect of this incomplete renaming is that the substitution provided for JIRA-2107 cannot be applied resulting in extremely bad query performance.

              Query query = QueryFactory.create
                      ( "SELECT COUNT(*) {\n"
                      + "  SELECT ?src {\n"
                      + "    ?src  <urn:connectedTo>  ?tgt .\n"
                      + "    << ?src <urn:connectedTo> ?tgt >>\n"
                      + "                  <urn:hasValue>  ?v\n"
                      + "  }\n"
                      + "}"
                      );
      
              Op op = Algebra.compile(query);
              Op op2 = TransformScopeRename.transform(op);
              System.out.println(op2);
      

      Actual:

      (project (?.1) (extend ((?.1 ?.0)) (group () ((?.0 (count))) (project (?src)
              (bgp
                (triple ?src <urn:connectedTo> ?/tgt)
                (triple << ?src <urn:connectedTo> ?tgt >> <urn:hasValue> ?/v)
                                                  ^^^^
              )))))
      

      Expected:

      (project (?.1) (extend ((?.1 ?.0)) (group () ((?.0 (count))) (project (?src)
              (bgp
                (triple ?src <urn:connectedTo> ?/tgt)
                (triple << ?src <urn:connectedTo> ?/tgt >> <urn:hasValue> ?/v)
                                                  ^^^^^
              )))))
      

      Attachments

        Issue Links

          Activity

            People

              andy Andy Seaborne
              Aklakan Claus Stadler
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: