Darren Griffith created RYA-30:
----------------------------------
Summary: Literal type information lost when inserting a matching
literal with a different type
Key: RYA-30
URL: https://issues.apache.org/jira/browse/RYA-30
Project: Rya
Issue Type: Bug
Reporter: Darren Griffith
I have 2 different SPARQL statements.
The first inserts a triple where the object is the integer literal "2" and a
triple where the object is the string literal "2". I believe these should be
considered 2 different literals. However, when I query for the triple with the
integer literal "2", it returns a triple with the string literal "2" (see
EXAMPLE 1).
The second inserts only a triple where the object is the integer literal "2",
which is the same triple inserted by the first statement. When I query for
this triple, it returns the triple with the integer literal "2" (see EXAMPLE 2).
I believe that my queries should return the same result in both cases. It
seems the Rya isn't including the type information in the symbol table and
overwriting what should be different literals.
— EXAMPLE 1 —
INSERT DATA {
<http://modusoperandi.com/Archivist/detection#jakarta_001.tif_jakarta_001_000.png>
<http://modusoperandi.com/Archivist/detection#confidence>"2"^^<http://www.w3.org/2001/XMLSchema#integer>
.
<http://modusoperandi.com/Archivist/provenance#6327df6d-79b8-48cd-a855-c7b4b77e0942>
<http://modusoperandi.com/Archivist/provenance#to> "2".
}
SELECT *
WHERE {
?s <http://modusoperandi.com/Archivist/detection#confidence> ?o .
}
<sparql xmlns="http://www.w3.org/2005/sparql-results#">
<head>
<variable name="s"/>
<variable name="o"/>
</head>
<results>
<result>
<binding name="s">
<uri>
http://modusoperandi.com/Archivist/detection#jakarta_001.tif_jakarta_001_000.png
</uri>
</binding>
<binding name="o">
<literal>2</literal>
</binding>
</result>
</results>
</sparql>
— EXAMPLE 2 —
INSERT DATA {
<http://modusoperandi.com/Archivist/detection#jakarta_001.tif_jakarta_001_000.png>
<http://modusoperandi.com/Archivist/detection#confidence>"2"^^<http://www.w3.org/2001/XMLSchema#integer>
.
}
SELECT *
WHERE {
?s <http://modusoperandi.com/Archivist/detection#confidence> ?o .
}
<sparql xmlns="http://www.w3.org/2005/sparql-results#">
<head>
<variable name="s"/>
<variable name="o"/>
</head>
<results>
<result>
<binding name="s">
<uri>
http://modusoperandi.com/Archivist/detection#jakarta_001.tif_jakarta_001_000.png
</uri>
</binding>
<binding name="o">
<literal datatype="http://www.w3.org/2001/XMLSchema#integer">2</literal>
</binding>
</result>
</results>
</sparql>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)