Uploaded image for project: 'Blazegraph (by SYSTAP)'
  1. Blazegraph (by SYSTAP)
  2. BLZG-621

Exception when using SPARQL sort & statement identifiers

    Details

      Description

      Hi,

      I have some data in my Bigdata store with attached statement identifiers (say http://example.com). When executing the following SPARQL query (with sort statement):

      SELECT DISTINCT ?property ?hasValue ?isValueOf
      WHERE {
        { ?isValueOf ?property <http://example.com> }
      }
      ORDER BY (!BOUND(?hasValue)) ?property ?hasValue ?isValueOf
      

      an exception is thrown:

      java.lang.ClassCastException: com.bigdata.rdf.internal.impl.bnode.SidIV cannot be cast to org.openrdf.model.Literal
      

      Without the ORDER BY everything is fine. Is this a bug or am I doing something wrong here? (see attachment for full stack trace).

      Thanks,
      Raoul

        Activity

        Hide
        bryanthompson bryanthompson added a comment -

        Raoul,

        Looks like a bug. I've been able to reproduce this on our end when comparing two SIDs. There also appears to be an ordering problem when comparing a SID and a URI (SIDs should be ordered before URIs if they are modeled as blank nodes).

        I've expanded test coverage for this and modified the IVComparator to order SIDs (a) after normal blank nodes; and (b) lexically using their internal IV representation (this will group solutions with the same SidIV together).

        You can update from SVN and test the fix if you like.

        Committed revision r6085.

        Thanks,
        Bryan

        Show
        bryanthompson bryanthompson added a comment - Raoul, Looks like a bug. I've been able to reproduce this on our end when comparing two SIDs. There also appears to be an ordering problem when comparing a SID and a URI (SIDs should be ordered before URIs if they are modeled as blank nodes). I've expanded test coverage for this and modified the IVComparator to order SIDs (a) after normal blank nodes; and (b) lexically using their internal IV representation (this will group solutions with the same SidIV together). You can update from SVN and test the fix if you like. Committed revision r6085. Thanks, Bryan

          People

          • Assignee:
            Unassigned
            Reporter:
            raoulw raoulw
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: