Re: interesting examples

On 26/11/16 18:47, Peter F. Patel-Schneider wrote:
> I have added a new test and shown what I think the results for several
> setups are are on some data.  The "Expected" results are what I think should
> be expected from the fixed definition of SPARQL that the group is supposed
> to produce.
>
> Graph
>  :s :p :v .
>  :t :r :w .
>
>
> SELECT ?x WHERE {
>    ?x :p :v .
>    FILTER ( EXISTS {
>      FILTER ( ?x = :s ) )
>      } )
>    }
>
> Specification { { (x,:s) } }
> Proposal A { { (x,:s) } }
> Proposal B { }
> Expected { { (x,:s) } }
>
>
Proposal B gets  { { (x,:s) } }

There is a empty BGP that the  FILTER ( ?x = :s ) applies to which is no 
removed by simplification so it injects ?x. Filter in the algebra always 
filters the results of a pattern.

(prefix ((: <http://example/>))
   (project (?x)
     (filter (exists
                (filter (= ?x :s)
                  (bgp empty)))
       (bgp (triple ?x :p :v)))))

     Andy

Received on Sunday, 27 November 2016 20:21:24 UTC