Re: Converting VALUES to SPARQL algebra

Joachim,

I see your point and the spec is indeed not very explicit. Section
10.2.1 (VALUES syntax) introduces the feature by means of an example:
In the following example, there is a table of two variables, ?x and
?y. The second row has no value for ?y.
VALUES (?x ?y) {
  (:uri1 1)
  (:uri2 UNDEF)
}

Section 1.2.3 (Result Descriptions) describes how solutions (solution
mappings) are described in table form, i.e., variables are in the
table header (you have to infer that this is ?x ?y in the example) and
each row (again infer that (:uri1 1) and (:uri2 UNDEF) represent the
rows) then contributes a solution mapping by mapping the variables to
the row values. Hence, for the example, you would get two solution
mappings: (1) x -> :uri1, y -> 1 and (2) x -> :uri2. The mapping for y
is omitted in solution (2) as described in 18.2.2.6. You then have to
extrapolate from the example to the general case.

Birte

On 2 March 2015 at 11:05, james anderson <james@dydra.com> wrote:
> good morning;
>
> Begin forwarded message:
>
>> Resent-From: public-sparql-dev@w3.org
>> From: Joachim Van Herwegen <Joachim.VanHerwegen@ugent.be>
>> Subject: Converting VALUES to SPARQL algebra
>> Date: 2015-03-02 10:22:55 GMT+1
>> To: public-sparql-dev@w3.org
>>
>> I was wondering how one converts a query contain VALUES such as in http://www.w3.org/TR/sparql11-query/#inline-data to SPARQL algebra?
>> The spec just mentions 'The result is a multiset of solution mappings 'data'.'.
>> The validator at http://www.sparql.org/query-validator.html outputs this as: (table (vars ?book) (row [?book :book1]) (row [?book :book3]) ) but nowhere does the spec define table or row (as far as I can see).
>> Are the table/row elements just a custom implementation or is there a different spec somewhere that defines these?
>
> i would agree with the remark elsewhere, that the closest is the translation description at 18.2.4.3 (http://www.w3.org/TR/sparql11-query/#sparqlAlgebraFinalValues), which refers to your cited text and (indirectly) to the definition of ToMultiset (http://www.w3.org/TR/sparql11-query/#sparqlAlgebra).
>
> the “table” notation, so far as i understand, appeared with ARQ’s algebra notation (http://www.w3.org/2011/09/SparqlAlgebra/ARQalgebra) - or, in any case, that is where i recall first having seen it.
>
> best regards, from berlin
> ---
> james anderson | james@dydra.com | http://dydra.com
>
>
>
>
>
>



-- 
Jun. Prof. Dr. Birte Glimm            Tel.:    +49 731 50 24125
Inst. of Artificial Intelligence         Secr:  +49 731 50 24258
University of Ulm                         Fax:   +49 731 50 24188
D-89069 Ulm                               birte.glimm@uni-ulm.de
Germany

Received on Monday, 2 March 2015 10:30:16 UTC