I've checked out the HEAD revision of Jena SDB and adapted the
Layout2/Index store layout to support quads (adding, deleting, and
querying). It works great except for one problem, which I've also
observed when using the original layout and not querying graphs:
when I perform a query the entire result set is collected into a
list before I get the first solution. I understand that this is
neccessary when FILTER clauses, for example, are involved. But this
query doesn't have those, and should be streamable:
SELECT ?site ?title
WHERE {
GRAPH ?g1 { ?site rdf:type my:Site }
OPTIONAL { GRAPH ?g2 { ?site dc:title ?title } }
}
The ResultSetStream's queryExecutionIter shows this in the debugger:
QueryIterSingleton [Root]
QueryIterSQL
QueryIterProject ?site ?title
It doesn't seem to me like any of these iterators should need to
collect results into a list. Is it standard behavior for the
results of all queries to be collected into a list before the first
solution is available? If so, is there anything simple that I can
do to change it?
Thanks,
Hilton Campbell