On 03/12/13 12:27, Reto Bachmann-Gmür wrote:
Hello

Encountered an issue in clerezza of which the root cause seems to be in
Jena so forearding this here. The code is using jena-core and -arq version
2.11.

Work for me (using TDB which, from the way the question is asked is what you are doing else the thing is meaning less as it will deref <urn:x-foo:bar>).

-------------- D.trig
prefix : <http://example/>

:s :p :o .

:g1 { :s1 :p1 :o1 }
:g2 { :s2 :p2 :o2 }
--------------
tdbloader --loc=DB D.trig
--------------
SELECT *
FROM <http://example/g1>
WHERE {
   ?s ?p ?o
}
--------------
-------------------------------------------------------------------
| s                   | p                   | o                   |
===================================================================
| <http://example/s1> | <http://example/p1> | <http://example/o1> |
-------------------------------------------------------------------


qexec = QueryExecutionFactory.create("SELECT  *
FROM <urn:x-foo:bar>
WHERE { ?s ?p ?o }", dataset);

what kind of dataset is 'dataset'?  Is it wrapping anything?

qexec.execSelect();

It seems to me that for this query the default graph in the dataset should
be ignored and instead a graph <urn:x-foo:bar> be looked up.

Yep.

However it
seems that only the default graph which is accessed via
dataset.asDatasetGraph().getDefaultGraph() is used.

dataset.asDatasetGraph().getDefaultGraph()

will still be the storage default graph.

Is there some special setting to have the FROM clause used?

No.

        Andy


Cheers,
Reto


---------- Forwarded message ----------
From: Reto Bachmann-Gmür <[email protected]>
Date: Tue, Dec 3, 2013 at 1:05 PM
Subject: Jena based SPARQL QueryEngine: FROM claused ignored
To: [email protected]


Hello,

I've been investigating the issue that the FROM-clause is ignored and I've
opened CLEREZZA-846.

The query is passed including its from clause to
QueryExecutionFactory.create(Query, dataset), however only the default
graph is accessed in the underlying dataset.

So the FROM in

SELECT  *
FROM <urn:x-localinstance:/graph-access.graph>
WHERE { ?s ?p ?o }

seems to be just ignored. Any ideas?

Cheers,
Reto


Reply via email to