Re: interesting examples

On 26/11/16 21:36, Peter F. Patel-Schneider wrote:
> Yes, I forgot about the phantom empty BGPs in the algebra.  My mistake.
>
> That addresses one or two of the cases, but not, I think, all the MINUS ones.
>
> I'll update my message.
>
>
> What about { SELECT ?x WHERE { } }?  Isn't that translated as follows?
>
> Translate( { SELECT ?x WHERE { } } )
> Join( Z, Translate( SELECT ?x WHERE { } ) )
> Join( Z, ToMultiSet( ... ) )
> ToMultiSet( ... )

ToMultiSet of a empty BGP which is included in the injection.

>
> Also, is every case of OPTIONAL going to work out in Proposal B?

Should do -  including doubly nested optionals.

    Andy

>
> peter
>
>
> On 11/26/2016 12:07 PM, Andy Seaborne wrote:
>>
>>
>> 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)))))
>>
>> My prototype gets:
>>
>> ------
>> | x  |
>> ======
>> | :s |
>> ------
>>
>>
>>      Andy
>>
>> (PS This may become a duplicate - I sent a copy from the wrong address a few
>> mins ago)
>>

Received on Monday, 28 November 2016 14:45:39 UTC