- From: Andy Seaborne <andy@apache.org>
- Date: Mon, 22 Jun 2015 11:46:11 +0100
- To: public-rdf-dawg-comments@w3.org
Roman, Thank you for the comment. I've recorded this as query-errata-7a. I agree that it may be impossible to write an explanatory expansion because the second two elements of the union can't be considered separately. (When combined, they seem to form the diff part of the definition.) Andy On 16/06/15 16:42, Roman Kontchakov wrote: > Dear Andy > > It seems to me that the fix to the "written in full" definition of LeftJoin as described in http://www.w3.org/2013/sparql-errata#sparql11-query does not quite work. > > For example, let Ω1 = { (?X -> :a) }, Ω2 = { (?X -> :a, ?A -> 20), (?X -> :b, ?A -> 30) } and F = ?A = 30. > > Using the normative definition, LeftJoin(Ω1,Ω2,F) = Filter(F, Join(Ω1,Ω2)) union Diff(Ω1,Ω2,F), we obtain > > - Join(Ω1,Ω2) = { (?X -> :a, ?A -> 20) } and so Filter(F, Join(Ω1,Ω2)) is empty; > > - on the other hand, Diff(Ω1,Ω2,F) = { (?X -> :a) } because for the only mapping μ1 in Ω1, the first mapping in Ω2 is compatible with μ1 but the effective boolean value of F is false and the second mapping in Ω2 is not compatible with μ1. > > Thus, LeftJoin(Ω, Ω2, F) = { (?X -> :a) } (1) > > Using the "written in full" definition from the errata, > > LeftJoin(Ω1, Ω2, F) = { merge(μ1, μ2) | μ1 in Ω1 and μ2 in Ω2, μ1 and μ2 are compatible and F(merge(μ1, μ2)) is true } > ∪ { μ1 | μ1 in Ω1, ∀ μ2 in Ω2, μ1 and μ2 are not compatible, or Ω2 is empty } > ∪ { μ1 | μ1 in Ω1, ∀ μ2 in Ω2, μ1 and μ2 are compatible and F(merge(μ1, μ2)) is false } > > we obtain, respectively, > > - the empty set (see above), > - the empty set (because Ω2 is not empty and contains a mapping compatible with the only mapping in Ω1), > - the empty set (because the first mapping in Ω2 is compatible with the only mapping in Ω1 but F is false). > > The result, therefore, is the empty set, which is not equal to (1). > > In fact, I suspect, there is no simple way of translating the two components in the union of the normative definition into some sort of `three-component' union. So, in my view, it is easier to replace the current "written in full" version of LeftJoin with Filter over Join + Diff (or omit it altogether to avoid any confusion). > > Best regards > Roman > > -- > Roman Kontchakov > Birkbeck, University of London >
Received on Monday, 22 June 2015 10:46:43 UTC