good evening; if you want to reproduce those results, you will have to examine the parsed syntax tree. that should comprise just two bgps, as that is the immediate syntax. if, on the other hand, you examaine the results of a query planner, you are not looking at a systax tree, you are looking at the query processor's prospective exection plan. execution model permits the transformations to which i alluded. you will more likely get your desired representation by having jena emit an sse, rather than an execution plan.
best regards, from berlin, > On 20. Sep 2023, at 17:48, Hashim Khan <[email protected]> wrote: > > Thanks for the quick reply. > > To be precise, I want to clarify the table on page 7 of the attached paper. > Here, the No. of BGPs is 2, and also some more values. I want to extract all > the info using Jena. But I could not till now. About the LSQ, I will check > it, but I am following this paper and want to reproduce the results. > > Best Regards, > Hashim > > On Tue, Sep 19, 2023 at 4:18 PM James Anderson > <[email protected]> wrote: > good afternoon; > > you have to consider that a query processor is free to consolidate statement > patterns in a nominal bgp - which itself implicitly joins them, or separate > them in order to either apply a different join strategy or - as in this case, > to interleave an operation under the suspicion that it will reduce solution > set cardinality. > > best regards, from berlin, > > > On 19. Sep 2023, at 13:20, Hashim Khan <[email protected]> wrote: > > > > Hi, > > > > Having a look on this SPARQL query: > > --------------------------------------------------------------------------- > > prefix dbo:<http://dbpedia.org/ontology/> > > prefix dbr:<http://dbpedia.org/resource/> > > prefix foaf:<http://xmlns.com/foaf/0.1/> > > > > SELECT DISTINCT ?name ?birth ?death > > WHERE { ?person dbo:birthPlace dbr:Berlin . > > ?person dbo:birthDate ?birth . > > ?person foaf:name ?name . > > OPTIONAL { ?person dbo:deathDate ?death . } > > FILTER (?birth < "1900-01-01") . > > } > > LIMIT 100 > > ----------------------------------------------------------------------------- > > Using Apache Jena ARQ command, ./arq --query exampleQuery.sparql --explain > > I got this result. > > > > 13:11:41 INFO exec :: ALGEBRA > > (slice _ 100 > > (distinct > > (project (?name ?birth ?death) > > (conditional > > (sequence > > (filter (< ?birth "1900-01-01") > > (bgp > > (triple ?person <http://dbpedia.org/ontology/birthPlace> < > > http://dbpedia.org/resource/Berlin>) > > (triple ?person <http://dbpedia.org/ontology/birthDate> > > ?birth) > > )) > > (bgp (triple ?person <http://xmlns.com/foaf/0.1/name> ?name))) > > (bgp (triple ?person <http://dbpedia.org/ontology/deathDate> > > ?death)))))) > > 13:11:41 INFO exec :: BGP > > ?person <http://dbpedia.org/ontology/birthPlace> < > > http://dbpedia.org/resource/Berlin> > > ?person <http://dbpedia.org/ontology/birthDate> ?birth > > 13:11:41 INFO exec :: Reorder/generic > > ?person <http://dbpedia.org/ontology/birthPlace> < > > http://dbpedia.org/resource/Berlin> > > ?person <http://dbpedia.org/ontology/birthDate> ?birth > > 13:11:41 INFO exec :: BGP :: ?person < > > http://xmlns.com/foaf/0.1/name> ?name > > ------------------------ > > | name | birth | death | > > ======================== > > ------------------------ I have a question about the Basic Graph Patterns. > > I think, in this query there are two BGPs. But here i shows 3. Can anyone > > explain it to me? Also, I want to know, the number of joins, no of > > projection variables, number of left joins, depth, and such other relevant > > info about the query features. How can I get all at one place? > > > > Best Regards, > > > > > > *Hashim Khan* > > --- > james anderson | [email protected] | https://dydra.com > > > > > -- > Hashim Khan > > <swj3336.pdf> --- james anderson | [email protected] | https://dydra.com
