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

ClassCastException when querying with binding-values that are not known to the database

    Details

      Description

      When using the BigdataSailConnection.evaluate method that accepts a BindingSet iteration I have observed the following behaviour:

      When an input bindingset contains a value that is not backed by the database (has no termid) that will result in a ClassCastException. The same query (with the same binding-value) when using the overload does not show that behaviour.

      Caused by: java.lang.ClassCastException: com.bigdata.rdf.internal.DummyIV cannot be cast to com.bigdata.rdf.internal.TermId
      	at com.bigdata.rdf.lexicon.LexiconRelation.getTerms(LexiconRelation.java:1845)
      

      Allthough this is not a huge issue to me: during normal operation our query evaluator probably won't stream non existent values into the evaluation. But there may be edge cases that make this a possibility, and they would ideally be handled a bit more graceful than with a ClassCastException.

      Could you please give me your thoughts on this?

        Activity

        Hide
        bryanthompson bryanthompson added a comment -

        This is a bug. The code should be testing to see if something is a "dummy iv" versus a TermId. In the dev branch, dummy ivs are actually TermId's with a 0L termId value.

        Show
        bryanthompson bryanthompson added a comment - This is a bug. The code should be testing to see if something is a "dummy iv" versus a TermId. In the dev branch, dummy ivs are actually TermId's with a 0L termId value.

          People

          • Assignee:
            mikepersonick mikepersonick
            Reporter:
            gjdev gjdev
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: