W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > July to September 2011

Test cases on aggregates and exists

From: Olivier Corby <Olivier.Corby@sophia.inria.fr>
Date: Tue, 27 Sep 2011 11:06:59 +0200
Message-ID: <4E819233.6030003@sophia.inria.fr>
To: public-rdf-dawg@w3.org
Hi,


ACTION-531 : Check Query test cases coverage in terms of errors in 
aggregate evaluation and positiveEXISTS tests [on Olivier Corby - due 
2011-09-27].


I have added two test cases on aggregates based on the query document 
example:

agg-err-01

PREFIX : <http://example.com/data/#>
SELECT ?g (AVG(?p) AS ?avg) ((MIN(?p) + MAX(?p)) / 2 AS ?c)
WHERE {
   ?g :p ?p .
}
GROUP BY ?g

agg-err-02

PREFIX : <http://example.com/data/#>
SELECT ?g
(AVG(IF(isNumeric(?p), ?p, COALESCE(xsd:double(?p),0))) AS ?avg)
WHERE {
   ?g :p ?p .
}
GROUP BY ?g

_____________


I have created a "exists" directory and added 5 test cases on positive 
exists :


select * where {
?s ?p ?o
filter exists {?s ?p ex:o}
}

select * where {
?s ?p ex:o2
filter exists {ex:s ex:p ex:o}
}

select * where {
graph <exists02.ttl> {
   ?s ?p ex:o1
   filter exists { ?s ?p ex:o2 }
}}

select * where {
   ?s ?p ex:o
   filter exists { ?s ?p ex:o1  filter exists { ?s ?p ex:o2 } }
}

select * where {
   ?s ?p ex:o
   filter exists { ?s ?p ex:o1  filter not exists { ?s ?p ex:o2 } }
}



Best regards

Olivier
Received on Tuesday, 27 September 2011 09:07:30 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 16:15:46 GMT