Hi all,This is originally entered as a JENA issue (marked as minor) [1], but I wanted to reach out to Jena users to get an insight:
At this point I'm lead to believe that ARQ is not making an optimization before making a federated query. Or, well, hopefully the issue has to do with my SPARQL knowledge
When trying to make two federated queries (may or may not be to same endpoint), the solution of the first graph pattern in SERVICE is projected onto the second SERVICE. e.g.,
SELECT DISTINCT ?a ?c ?x ?y
WHERE {
{ SERVICE <http://example.org/sparql> {
?a :p ?x .
?a skos:exactMatch ?b .
} }
{ SERVICE <http://example.info/sparql> {
?c :p ?y .
?c skos:exactMatch ?d .
} }
FILTER (?b = ?c || ?d = ?a || ?a = ?c)
}
As there are no overlapping variable names in use, shouldn't each
SERVICE do its own thing independently from one another, and then the
results get joined?
What I'm experiencing is that, if the first query comes back with n number of triples, the second query is called n times. Expectation is that, each query is called once.
See also: http://answers.semanticweb.com/questions/22550/joining-and-filtering-federated-sparql-queries-with-a-single-request-per-service Thanks, [1] https://issues.apache.org/jira/browse/JENA-449 -Sarven http://csarven.ca/#i
smime.p7s
Description: S/MIME Cryptographic Signature
