Skip to content

No type information in n-triples output #2700

@kmRadiatorius

Description

@kmRadiatorius

When returning CONSTRUCT results as application/n-triples, qlever does not include type information for int, float and boolean types (and maybe some others as well). This breaks n-triples parsers, which expect type information to always be provided.

Example query:

PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX : <http://example.com#>

CONSTRUCT {
    :results :int ?int ;
             :float ?float ;
             :bool ?bool .
} WHERE {
     BIND ("1"^^xsd:nonNegativeInteger AS ?int)
     BIND ("1"^^xsd:float AS ?float)
     BIND ("true"^^xsd:boolean AS ?bool)
 }

Actual results:

<http://example.com#results> <http://example.com#int> 1 .
<http://example.com#results> <http://example.com#float> 1.0 .
<http://example.com#results> <http://example.com#bool> true .

Expected results:

<http://example.com#results> <http://example.com#int> "1"^^<http://www.w3.org/2001/XMLSchema#nonNegativeInteger> .
<http://example.com#results> <http://example.com#float> "1"^^<http://www.w3.org/2001/XMLSchema#float> .
<http://example.com#results> <http://example.com#bool> "true"^^<http://www.w3.org/2001/XMLSchema#boolean> .

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions