W3C home > Mailing lists > Public > public-sparql-dev@w3.org > January to March 2015

how should undefined elements figure in aggregate samples?

From: james anderson <james@dydra.com>
Date: Tue, 31 Mar 2015 00:54:39 +0000
Message-ID: <0000014c6d52b608-065b968b-cd00-441d-9eba-954dd790e38c-000000@eu-west-1.amazonses.com>
To: public-sparql-dev@w3.org
good evening,

should the sparql aggregation mechanism exclude unbound elements from the aggregation set?
must it?
may it?

in order for a query to correlate elements from sparse graphs, it seems that the unbound elements should be excluded.
still, i wonder what the recommendation intended.
there appears to be no directly relevant test in the w3c suite and while the language in the recommendation permits the more useful result, it leaves open the consequences, should the respective value set include undef markers only.

to be specific, is there a canonical result for the following query?

select ?o
        (sample(?s) as ?sSample)
        (count(?s) as ?sCount)
     	(sample(?p) as ?pSample)
     	(count(?p) as ?pCount)
     	(sum(?v) as ?vSum)
where {
 values (?s ?p ?o ?v)
 { (<http://example.org/s1> undef <http://example.org/o1> undef)
   (<http://example.org/s2> undef <http://example.org/o1> 1)
   (<http://example.org/s3> undef <http://example.org/o1> undef)
   (<http://example.org/s4> <http://example.org/p4> <http://example.org/o1> 1)
   (<http://example.org/s5> undef <http://example.org/o2> undef)
   (<http://example.org/s6> undef <http://example.org/o2> 1)
   (<http://example.org/s7> <http://example.org/p6> <http://example.org/o3> 1)
   (<http://example.org/s8> undef <http://example.org/o3> 1)
} group by ?o

best regards, from berlin,
james anderson | james@dydra.com | http://dydra.com
Received on Tuesday, 31 March 2015 00:55:10 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 31 March 2015 00:55:10 UTC