Issue 1 - ToMultiSet

On the first point:

[[
Problem 1: Some uses of EXISTS are undefined

exists is only defined for graph patterns, but in
SELECT ?x WHERE {
?x :p :c .
FILTER EXISTS { SELECT ?y { ?y :q :c . } } }
the argument to exists ends up being a ToMultiSet, which is not listed 
under "Graph Pattern" in the table of SPARQL algebra symbols.
]]

This isn't specific to EXISTS. It's about anywhere a sub-SELECT is used. 
  { ... } is a graph pattern group and results in a join. The arguments 
to join are teh evaluation of a graph patterns - multisets.

Looking at it use in "18.2.2.6 Translate Graph Patterns [1] (right at 
the end of the section), the last example of "18.2.3 Examples of Mapped 
Graph Patterns" [2] and "18.2.4.3 VALUES" [3], using is join shows it in 
the same light as the other graph patterns.

Therefore, I think we can address this with an entry in the 
https://www.w3.org/2013/sparql-errata

Draft:

[[
query-errata-N:

"Section 18.2 Translation to the SPARQL Algebra" intro (end):

ToMultiSet can be used where a graph pattern is mentioned below because
the outcome of evaluating a graph pattern is a multiset.
]]

ToMultiSet has the same result type the same as the other graph patterns 
but it is also a solution modifier (acts on a solution sequence).

     Andy


[1]
https://www.w3.org/TR/sparql11-query/#sparqlTranslateGraphPatterns
[2]
https://www.w3.org/TR/sparql11-query/#sparqlAlgebraExamples
[3]
https://www.w3.org/TR/sparql11-query/#sparqlAlgebraFinalValues

Received on Thursday, 7 July 2016 09:28:12 UTC