W3C home > Mailing lists > Public > public-rdf-dawg-comments@w3.org > June 2012

Questions regarding test case: agg-groupconcat-01 (GROUP_CONCAT 1)

From: Peter Waher <Peter.Waher@clayster.com>
Date: Tue, 19 Jun 2012 15:55:05 +0000
To: "public-rdf-dawg-comments@w3.org" <public-rdf-dawg-comments@w3.org>
Message-ID: <1693EFE1FD641C42A0D542FCBC732DE69627D4A1@EX3.YODA.UTOPIA.LOCAL>

I have some questions regarding the use of [] is queries in the test cases. To me, the following test case (aggregates/agg-groupconcat-01, GROUP_CONCAT 1) is not correctly defined. Have I misunderstood something, or is this a known error, or does the short form [] match anything, and not only blank nodes?

Manifest: (Notice it has been approved)

:agg-groupconcat-01 rdf:type mf:QueryEvaluationTest ;
    mf:name    "GROUP_CONCAT 1" ;
            mf:feature sparql:group_concat ;
    dawgt:approval dawgt:Approved;
    dawgt:approvedBy <http://www.w3.org/2009/sparql/meeting/2010-09-07#resolution_2> ;
         [ qt:query  <agg-groupconcat-1.rq> ;
           qt:data   <agg-groupconcat-1.ttl> ] ;
    mf:result  <agg-groupconcat-1.srx>


@prefix : <http://www.example.org/> .

:s :p1 "1", "22" .
:s :p2 "aaa", "bb", "c" .


PREFIX : <http://www.example.org/>
            {SELECT (GROUP_CONCAT(?o) AS ?g) WHERE {
                         [] :p1 ?o
            FILTER(?g = "1 22" || ?g = "22 1")

To my eyes (and in our implementation) this returns false. But the test case states it should evaluate to true:

<?xml version="1.0"?>
<sparql xmlns="http://www.w3.org/2005/sparql-results#">

To me, this pattern in the query shouldn't match any pattern at all in the data (:s is not a blank node, but an iri):

[] :p1 ?o

However, if I change this pattern in the query to

?x :p1 ?o

then the query evaluates to true in my implementation.

According to the specification, [] should match a blank node (not just anything):

So, which is correct?

*         Should [] in  a query be able to match any type of term?

o   Is this described in the specification, or does the specification need to be updated?

o   How does this relate to compatibility with SPARQL 1.0 queries?

*         Should the query in the test case be updated?

*         Have I misunderstood something else?

Thanks in advance,
Peter Waher
Received on Tuesday, 19 June 2012 15:55:39 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:52:12 UTC