W3C

Copyright © 2010 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C liability, trademark, and document use rules apply.


Abstract

Bindings

This page describes W3C SPARQL Working Group's SPARQL 1.1 test suite.

Contributing Tests

The test manifests and entries are built automatically from manifest.ttl using a Rake task. Tests may be contributed via pull request to https://github.com/w3c/rdf-tests with suitable changes to the manifest.ttl and referenced files.

Distribution

Distributed under both the W3C Test Suite License and the W3C 3-clause BSD License. To contribute to a W3C Test Suite, see the policies and contribution forms.

Disclaimer

UNDER BOTH MUTUALLY EXCLUSIVE LICENSES, THIS DOCUMENT AND ALL DOCUMENTS, TESTS AND SOFTWARE THAT LINK THIS STATEMENT ARE PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF THE DOCUMENT ARE SUITABLE FOR ANY PURPOSE; NOR THAT THE IMPLEMENTATION OF SUCH CONTENTS WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS. COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE DOCUMENT OR THE PERFORMANCE OR IMPLEMENTATION OF THE CONTENTS THEREOF.

Test Descriptions

values1: Post-query VALUES with subj-var, 1 row
type
mf:QueryEvaluationTest
approval
dawgt:Approved
approvedBy
http://www.w3.org/2009/sparql/meeting/2012-08-07#resolution_2
action
query
values01.rq
data
data01.ttl
result
values01.srx
values2: Post-query VALUES with obj-var, 1 row
type
mf:QueryEvaluationTest
approval
dawgt:Approved
approvedBy
http://www.w3.org/2009/sparql/meeting/2012-08-07#resolution_2
action
query
values02.rq
data
data02.ttl
result
values02.srx
values3: Post-query VALUES with 2 obj-vars, 1 row
type
mf:QueryEvaluationTest
approval
dawgt:Approved
approvedBy
http://www.w3.org/2009/sparql/meeting/2012-08-07#resolution_2
action
query
values03.rq
data
data03.ttl
result
values03.srx
values4: Post-query VALUES with 2 obj-vars, 1 row with UNDEF
type
mf:QueryEvaluationTest
approval
dawgt:Approved
approvedBy
http://www.w3.org/2009/sparql/meeting/2012-08-07#resolution_2
action
query
values04.rq
data
data04.ttl
result
values04.srx
values5: Post-query VALUES with 2 obj-vars, 2 rows with UNDEF
type
mf:QueryEvaluationTest
approval
dawgt:Approved
approvedBy
http://www.w3.org/2009/sparql/meeting/2012-08-07#resolution_2
action
query
values05.rq
data
data05.ttl
result
values05.srx
values6: Post-query VALUES with pred-var, 1 row
type
mf:QueryEvaluationTest
approval
dawgt:Approved
approvedBy
http://www.w3.org/2009/sparql/meeting/2012-08-07#resolution_2
action
query
values06.rq
data
data06.ttl
result
values06.srx
values7: Post-query VALUES with (OPTIONAL) obj-var, 1 row
type
mf:QueryEvaluationTest
approval
dawgt:Approved
approvedBy
["http://www.w3.org/2009/sparql/meeting/2012-08-07#resolution_2", "http://www.w3.org/2009/sparql/meeting/2011-05-24#resolution_4"]
action
query
values07.rq
data
data07.ttl
result
values07.srx
values8: Post-query VALUES with subj/obj-vars, 2 rows with UNDEF
type
mf:QueryEvaluationTest
approval
dawgt:Approved
approvedBy
http://www.w3.org/2009/sparql/meeting/2012-08-07#resolution_2
action
query
values08.rq
data
data08.ttl
result
values08.srx
inline1: Inline VALUES graph pattern
type
mf:QueryEvaluationTest
approval
dawgt:Approved
approvedBy
http://www.w3.org/2009/sparql/meeting/2012-08-07#resolution_2
action
query
inline01.rq
data
data01.ttl
result
inline01.srx
inline2: Post-subquery VALUES
type
mf:QueryEvaluationTest
approval
dawgt:Approved
approvedBy
http://www.w3.org/2009/sparql/meeting/2012-08-07#resolution_2
action
query
inline02.rq
data
data02.ttl
result
inline02.srx
graph: VALUES inside GRAPH binding the same variable as the graph name
type
mf:QueryEvaluationTest
approval
action
query
graph.rq
data
empty.ttl
graphData
data01.ttl
data02.ttl
result
graph.ttl
graph-no-var: VALUES inside GRAPH not mentioning the graph name variable

Each VALUES row is joined with every named graph

type
mf:QueryEvaluationTest
approval
action
query
graph-no-var.rq
data
empty.ttl
graphData
data01.ttl
data02.ttl
result
graph-no-var.ttl
graph-from-named-1: VALUES inside GRAPH binding the graph name variable, with FROM NAMED

Only graphs named by FROM NAMED are iterated; rows binding the graph variable to a graph excluded by FROM NAMED (ex:g2) or to an IRI that is no graph name at all (ex:unknown) are removed

type
mf:QueryEvaluationTest
approval
action
query
graph-from-named-1.rq
data
graph-from-named.trig
result
graph-from-named-1.srx
graph-from-named-2: Graph name variable bound outside GRAPH to graphs outside the dataset, with FROM NAMED

GRAPH ?g does not produce solutions for graph names outside the dataset, even if they are bound by a joined pattern and the inner pattern contains no triple patterns

type
mf:QueryEvaluationTest
approval
action
query
graph-from-named-2.rq
data
graph-from-named.trig
result
graph-from-named-2.srx
graph-from-named-3: GRAPH with a fixed IRI outside the dataset around VALUES, with FROM NAMED

GRAPH evaluates to the empty multiset if is not a graph name of the dataset, even if the inner pattern contains no triple patterns

type
mf:QueryEvaluationTest
approval
action
query
graph-from-named-3.rq
data
graph-from-named.trig
result
graph-from-named-3.srx
values-order-by: Post-query VALUES with ORDER BY

ORDER BY sorts by a variable that only the trailing VALUES clause binds

type
mf:QueryEvaluationTest
approval
action
query
values-order-by.rq
data
data-modifiers.ttl
result
values-order-by.srx
values-offset-limit: Post-query VALUES with OFFSET and LIMIT

OFFSET and LIMIT apply after the join with the trailing VALUES clause

type
mf:QueryEvaluationTest
approval
action
query
values-offset-limit.rq
data
data-modifiers.ttl
result
values-offset-limit.srx
values-distinct: Post-query VALUES with DISTINCT

DISTINCT applies after the join with the trailing VALUES clause, which duplicates each solution

type
mf:QueryEvaluationTest
approval
action
query
values-distinct.rq
data
data-modifiers.ttl
result
values-distinct.srx
values-group-order-by: Post-query VALUES with GROUP BY and ORDER BY

The trailing VALUES clause is joined after grouping, so ORDER BY can use an expression over a variable that only the trailing VALUES clause binds

type
mf:QueryEvaluationTest
approval
action
query
values-group-order-by.rq
data
data-modifiers.ttl
result
values-group-order-by.srx
values-select-star: Post-query VALUES with SELECT *

SELECT * includes the variables of the trailing VALUES clause

type
mf:QueryEvaluationTest
approval
action
query
values-select-star.rq
data
data-modifiers.ttl
result
values-select-star.srx
values-no-vars-no-rows: Post-query VALUES without variables and without rows

A trailing VALUES clause without rows makes the result empty

type
mf:QueryEvaluationTest
approval
action
query
values-no-vars-no-rows.rq
data
data-modifiers.ttl
result
values-no-vars-no-rows.srx
values-no-vars-two-rows: Post-query VALUES without variables and with two rows

A trailing VALUES clause with two empty rows duplicates each solution

type
mf:QueryEvaluationTest
approval
action
query
values-no-vars-two-rows.rq
data
data-modifiers.ttl
result
values-no-vars-two-rows.srx
values-subquery-offset-limit: Post-subquery VALUES with OFFSET and LIMIT

OFFSET and LIMIT of the subquery apply after the join with its trailing VALUES clause

type
mf:QueryEvaluationTest
approval
action
query
values-subquery-offset-limit.rq
data
data-modifiers.ttl
result
values-subquery-offset-limit.srx
values-ask: Post-query VALUES with ASK

The trailing VALUES clause removes all solutions, so the answer is false

type
mf:QueryEvaluationTest
approval
action
query
values-ask.rq
data
data-modifiers.ttl
result
values-ask.srx
values-construct: Post-query VALUES with CONSTRUCT

The template uses a variable that only the trailing VALUES clause binds

type
mf:QueryEvaluationTest
approval
action
query
values-construct.rq
data
data-modifiers.ttl
result
values-construct.ttl
values-construct-group-by: Post-query VALUES with CONSTRUCT and GROUP BY

The trailing VALUES clause is joined after grouping, so the template can use a variable that only the trailing VALUES clause binds

type
mf:QueryEvaluationTest
approval
action
query
values-construct-group-by.rq
data
data-modifiers.ttl
result
values-construct-group-by.ttl
values-construct-limit: Post-query VALUES with CONSTRUCT and LIMIT

The trailing VALUES clause is joined before LIMIT. The template has a single triple, so LIMIT gives the same result whether it applies to the solutions or to the constructed triples

type
mf:QueryEvaluationTest
approval
action
query
values-construct-limit.rq
data
data-modifiers.ttl
result
values-construct-limit.ttl
values-group-by-projection: Post-query VALUES with GROUP BY and projected VALUES variable

The trailing VALUES clause is joined after grouping, so the projection can use a variable that only the trailing VALUES clause binds

type
mf:QueryEvaluationTest
approval
action
query
values-group-by-projection.rq
data
data-modifiers.ttl
result
values-group-by-projection.srx
values-group-by-select-expression: Post-query VALUES with GROUP BY and VALUES variable in SELECT expression

The trailing VALUES clause is joined after grouping, so a SELECT expression can use a variable that only the trailing VALUES clause binds

type
mf:QueryEvaluationTest
approval
action
query
values-group-by-select-expression.rq
data
data-modifiers.ttl
result
values-group-by-select-expression.srx
values-group-by-join: Post-query VALUES with GROUP BY joined on the grouping variable

The trailing VALUES clause is joined with the grouped solutions on the grouping variable

type
mf:QueryEvaluationTest
approval
action
query
values-group-by-join.rq
data
data-modifiers.ttl
result
values-group-by-join.srx