Recorded as

https://issues.apache.org/jira/browse/JENA-384

On 21/01/13 06:18, Holger Knublauch wrote:
I recently updated our code base from Jena 2.7.2 to Jena 2.7.4 and had a
few test failures. I narrowed it down to the following scenario:

import junit.framework.Assert;

import org.junit.Test;

import com.hp.hpl.jena.query.Query;
import com.hp.hpl.jena.query.QueryExecution;
import com.hp.hpl.jena.query.QueryExecutionFactory;
import com.hp.hpl.jena.query.QueryFactory;
import com.hp.hpl.jena.query.QuerySolutionMap;
import com.hp.hpl.jena.rdf.model.ModelFactory;
import com.hp.hpl.jena.vocabulary.RDFS;
s
public class TestJenaASK {

     @Test
     public void testAskPrebound() {
         Query query = QueryFactory.create("ASK WHERE { FILTER (?arg =
<" + RDFS.Literal + ">) }");
         QueryExecution qexec = QueryExecutionFactory.create(query,
ModelFactory.createDefaultModel());
         QuerySolutionMap binding = new QuerySolutionMap();
         binding.add("arg", RDFS.Literal);
         qexec.setInitialBinding(binding);
         boolean result = qexec.execAsk();
         Assert.assertTrue(result);
     }
}

Looking at the generated Algebra, it looks like in the newer version the
FILTER clause doesn't get executed, even though it should because there
is a pre-bound variable from the initial bindings. Is this an
intentional change in the semantics or a regression issue?

BTW in our more complex scenarios we have some extra BIND statements
before the FILTER, but those don't make the FILTER run either.

Thanks,
Holger


Reply via email to