Re: R2RML test suite bugs

... and another one:

== R2RMLTC0014d ==

This uses the following SQL query as an R2RML view:

        SELECT *, (CASE "job"
            WHEN 'CLERK' THEN 'general-office'
            WHEN 'NIGHTGUARD' THEN 'security'
            WHEN 'ENGINEER' THEN 'engineering'
        END) AS ROLE FROM "EMP"

That's actually not valid SQL 2008. If the asterisk * is combined with additional select expressions, then it needs to be qualified with a table name:

    SELECT "EMP".*, ...

This seems a bit pointless, but HSQLDB complains about the query as it is in the test case now, and according to the SQL spec it complains rightfully. So this should be fixed to make the test suite valid SQL 2008.

Best,
Richard



On 30 Jun 2012, at 15:07, Richard Cyganiak wrote:

> Hi Boris,
> 
> I've spotted a few bugs in the R2RML test suite. I've used the latest test suite from hg. One bug makes the test mapping invalid. A couple others violate SHOULD-level requirements without a good reason.
> 
> Best,
> Richard
> 
> 
> == R2RMLTC0014b ==
> 
> The mapping file contains the following SQL query as an R2RML view:
> 
>       SELECT ('http://example.com/emp/' || "empno") AS empURI
>            , "empno"
>            , "ename"
>            , ('http://example.com/emp/job/'|| "job") AS jobTypeURI
>            , "job"
>            , deptno
>            , ('http://example.com/emp/etype/'|| "etype") AS empTypeURI
>            , "etype"
>            , ('http://example.com/graph/'|| "job" || '/' || "etype") AS graphURI
>       FROM "EMP"
> 
> deptno needs to be enclosed in double quotes to match the table definition. 
> 
> 
> == R2RMLTC0005a ==
> == R2RMLTC0011a ==
> == R2RMLTC0013a ==
> 
> They use the following template:
> 
>   http://example.com/{"fname"}-{"lname"}
>   http://example.com/{ID}/{FirstName}-{LastName}
>   http://example.com/Person/{"ID"}/{"Name"}-{"DateOfBirth"}
> 
> Such templates SHOULD NOT be used because “-” is not a safe separator if fname or lname ever contains a dash:
> http://www.w3.org/TR/r2rml/#dfn-safe-separator
> 
> I suggest replacing the dashes with any IRI delim or sub-delim character, for example:
> 
>   http://example.com/{"fname"}+{"lname"}
>   http://example.com/{"fname"};{"lname"}
>   http://example.com/{"fname"}/{"lname"}
> 
> 
> == R2RMLTC0005b ==
> == R2RMLTC0012a ==
> == R2RMLTC0012b ==
> == R2RMLTC0012e ==
> 
> They use templates like the following:
> 
>   {"fname"}{"lname"}
> 
> Such templates SHOULD NOT be used. The empty string is not a safe separator. Strings generated from such templates cannot be reversed.
> 
> I suggest adding a separator that is unlikely to occur in the used columns, for example:
> 
>   {"fname"}|{"lname"}
>   {"fname"}_{"lname"}
> 
> 
> == R2RMLTC0006a ==
> == R2RMLTC0014c ==
> 
> Both use term maps with rr:constant, and specify an rr:termType:
> 
>   rr:objectMap [ rr:constant "Bad Student"; rr:termType rr:Literal; ]
> 
> Specifying rr:termType has no effect on a constant-valued term map. It only affects column- and template-valued term maps:
> http://www.w3.org/TR/r2rml/#termtype
> 
> This is because the term type for a constant-valued term map is simply determined by the constant node. "Bad Student" is a literal, so the resulting term is a literal.
> 
> As the spec states: “An R2RML mapping graph SHOULD NOT include IRIs from the R2RML vocabulary where such use is not explicitly allowed or required by a clause in this specification.” Hence I suggest removing these rr:termType triples.

Received on Saturday, 30 June 2012 14:40:02 UTC