1. Summary
  2. Files
  3. Support
  4. Report Spam
  5. Create account
  6. Log in

Ticket #505 (closed defect: fixed)

Opened 15 months ago

Last modified 15 months ago

Exception when using SPARQL sort & statement identifiers

Reported by: raoulw Owned by:
Priority: major Milestone:
Component: Bigdata RDF Database Version: BIGDATA_RELEASE_1_1_0
Keywords: Cc: mrpersonick

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

Attachments

bigdata_stacktrace.txt (8.3 KB) - added by raoulw 15 months ago.
Stack trace

Change History

Changed 15 months ago by raoulw

Stack trace

Changed 15 months ago by thompsonbry

  • cc mrpersonick added
  • status changed from new to closed
  • resolution set to fixed

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

Note: See TracTickets for help on using tickets.