Project

General

Profile

Bug #104

Subtypes ignored in datatyped literal comparisons

Added by Alex Hall - over 14 years ago. Updated about 14 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Mulgara
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
fixed

Description

When a new stringpool node is allocated (in XAStringPoolImpl.Phase.findGNode), the AVL comparator does not use the subtype ID locating the SPObject in the stringpool. If you attempt to insert a datatyped literal, and there is already a stringpool entry with an identical type ID and lexical form but different subtype ID, then the node for that existing entry is returned. For instance, if there is already an entry for "0"^^xsd:integer, you cannot insert "0"^^xsd:nonNegativeInteger -- it gets mapped to the existing "0"^^xsd:integer.

Fixing this issue would probably require modifying the comparator to use the subtype ID. This would have implications for any code that wants to take slices from the stringpool for typed literals, ignoring subtype (as I believe is the case in the XSD resolver). Also, changing the comparator would change the ordering in the stringpool, which would break backwards compatibility with previous database versions.

#1

Updated by Paula Gearon about 14 years ago

  • Status changed from New to Closed
  • Resolution set to fixed

AVL comparators now consider subtype. SPARQL FILTER operations are now required for distinguishing different data types. See r1182

Also available in: Atom PDF