Tim

Running Fuseki with just the --version argument will dump out the versions
of the various components to stdout

VALUES translates into the table operator which essentially provides a set
of solutions which are joined to some other part of the query.  So with
the unoptimised algebra ARQ would first execute the BGP, then the table
and then join the results together.  Since join only combines compatible
solutions this has the effect of throwing out any matches for the BGP that
don't match things from the VALUES clause.

In the case of the optimised algebra seen here ARQ is using the sequence
operator which means ARQ is doing an index join instead.  So this means
that for each possible solution produced from the table ARQ tries to
substitute it into the BGP.  Yes this can be considered as equivalent to a
union of the BGP with the sets of constants injected.

Rob

On 13/08/2014 13:51, "Tim Harsch" <harschw...@yahoo.com.INVALID> wrote:

>Hi all,
>I'm wondering if someone can help me check my understanding of how ARQ
>evaluates the following DAWG test query.  Output below using Fuseki 1.1.0
>( How do I check which version of ARQ is in this version of Fuseki?).
>I'm wondering if in the first un-optimized algebra form, this amounts to
>a filter of the values for the given variables?  And, in the second are
>the values injected into the BGP, so that in effect the execution plan
>would essentially be the same as a UNION of two graph patterns with the
>constants bound?  If I'm not correct here, then how do these two patterns
>differ?
>
>Thanks,
>Tim
>
>
>PREFIX  dc:   <http://purl.org/dc/elements/1.1/>
>PREFIX  :     <http://example.org/book/>
>PREFIX  ns:   <http://example.org/ns#>
>SELECT  ?book ?title ?price
>WHERE { ?book dc:title ?title . ?book ns:price ?price }
>VALUES ( ?book ?title )
>{
>    ( UNDEF "SPARQL Tutorial" )
>    ( :book2 UNDEF )
>}
>
>Algebra:
>  1 (base <http://example/base/>
>  2  (prefix ((dc: <http://purl.org/dc/elements/1.1/>)
>  3            (: <http://example.org/book/>)
>  4            (ns: <http://example.org/ns#>))
>  5    (project (?book ?title ?price)
>  6      (join
>  7        (bgp
>  8          (triple ?book dc:title ?title)
>  9          (triple ?book ns:price ?price)
> 10        )
> 11        (table (vars ?book ?title)
> 12          (row [?title "SPARQL Tutorial"])
> 13          (row [?book :book2])
> 14        )))))
>
>With Optimizations:
>  1 (base <http://example/base/>
>  2  (prefix ((dc: <http://purl.org/dc/elements/1.1/>)
>  3            (: <http://example.org/book/>)
>  4            (ns: <http://example.org/ns#>))
>  5    (project (?book ?title ?price)
>  6      (sequence
>  7        (table (vars ?book ?title)
>  8          (row [?title "SPARQL Tutorial"])
>  9          (row [?book :book2])
> 10        )
> 11        (bgp
> 12          (triple ?book dc:title ?title)
> 13          (triple ?book ns:price ?price)
> 14        )))))




Reply via email to