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

TDB detects attempt to reassign a variable.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Jena 2.11.0
    • Jena 2.11.1
    • ARQ, TDB
    • None

    Description

      With TDB, but not with a general in-memory dataset, a query of the form:

      PREFIX  :     <http://example/>
      
      SELECT  *
      WHERE
        { ?x :p 123
          { SELECT  ?x
            WHERE
              { ?x :p ?o }
          }
        }
      

      (key feature: projection from the subsquery)
      causes

      20:24:32 ERROR QueryIteratorCloseable    :: QueryFatalException
      com.hp.hpl.jena.sparql.ARQInternalErrorException: Attempt to reassign '?x' from '<http://example/x>' to '<http://example/x>'
      	at com.hp.hpl.jena.sparql.engine.binding.BindingHashMap.checkAdd(BindingHashMap.java:111)
      	at com.hp.hpl.jena.sparql.engine.binding.BindingHashMap.add(BindingHashMap.java:92)
      	at com.hp.hpl.jena.sparql.engine.binding.BindingFactory.materialize(BindingFactory.java:60)
      	at com.hp.hpl.jena.tdb.solver.QueryEngineTDB$QueryIteratorMaterializeBinding.moveToNextBinding(QueryEngineTDB.java:132)
      	at com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase.nextBinding(QueryIteratorBase.java:154)
      

      Looking at the optimized algebra, TDB is correct.

      Attachments

        1. DevMain.java
          2 kB
          Andy Seaborne

        Activity

          People

            andy Andy Seaborne
            andy Andy Seaborne
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: