Skip to content

Commit

Permalink
Clarify comparison of literals in SPARQL test suite
Browse files Browse the repository at this point in the history
Closes w3c#58
rubensworks authored May 20, 2019
1 parent 280e9de commit 46ac922
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions sparql11/index.html
Original file line number Diff line number Diff line change
@@ -281,8 +281,7 @@ <h4><a name="queryevaltests" id="queryevaltests"/>Query Evaluation Tests</a></h4
<a href="http://www.w3.org/TR/rdf-concepts/#section-graph-equality">equivalent</a> [RDF-CONCEPTS]
to the graph named in the result (after encoding in the DAWG result set
vocabulary, if necessary). Note that, solution order only is considered relevant, if the result is expressed in the test suite in the DAWG result set vocabulary, with explicit <code>rs:index</code> triples; otherwise solution order is considered irrelevant for passing. Equivalence can be tested by
checking that the graphs are isomorphic and have identical IRI and
literal nodes. Note that testing whether two result sets are isomorphic is simpler than full graph isomorphism. Iterating over rows in one set, finding a match with the other set, removing this pair, then making sure all rows are accounted for, achieves the same effect. </p>
checking that the graphs are isomorphic with identical IRI nodes, and equal literal nodes that are compared by value (test runners may convert lexical form to canonical form to compare character by character). Note that testing whether two result sets are isomorphic is simpler than full graph isomorphism. Iterating over rows in one set, finding a match with the other set, removing this pair, then making sure all rows are accounted for, achieves the same effect. </p>

<p>Query evaluation tests that involve the <a href="http://www.w3.org/TR/rdf-sparql-query#modReduced">REDUCED</a> keyword have slightly different passing criteria. These tests are indicated in the manifest files with the <tt>mf:resultCardinality</tt> predicate with an object of <tt>mf:LaxCardinality</tt>. To pass such a test, the result set produced by a SPARQL implementation must contain each solution in the expected result set at least once and no more than the number of times that the solution occurs in the expected result set. (That is, the expected result set contains the solutions with cardinalities as they would be if the query did not contain REDUCED; to pass the test, an implementation must produce the correct results with cardinalities between one and the cardinlity in the expected result set.)</p>

0 comments on commit 46ac922

Please sign in to comment.