Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
Jena 2.11.0
-
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.