Ticket #104 (closed defect: fixed)

Opened 7 months ago

Last modified 1 month ago

Subtypes ignored in datatyped literal comparisons

Reported by: alexhall Assigned to: pag
Priority: minor Milestone:
Component: Mulgara Version: 1.2.1
Keywords: Cc:

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.

Change History

10/14/08 22:20:15 changed by pag

  • 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