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

UnsupportedOperationException during query evaluation

    Details

      Description

      For some queries I get an UnsupportedOperationException. This bug was difficult to reproduce, as not only the data and query matter, but also the ordering in which statements are added to the triple store. The attached testcase and data can be used to reproduce the bug (at least on my workstation and on our buildserver). Adding the statements in a different way than in the testcase may make the exception go away.

      Query: SELECT ?x { ?x ?a ?t . ?x ?lookup ?l }
      Exception (on Var for binding x):

      java.lang.UnsupportedOperationException
      	at com.bigdata.bop.Var.get(Var.java:144)
      	at com.bigdata.bop.Constant.equals(Constant.java:147)
      	at java.util.HashMap.put(HashMap.java:376)
      	at java.util.HashSet.add(HashSet.java:200)
      	at com.bigdata.bop.BOpUtility.getIndex(BOpUtility.java:425)
      	at com.bigdata.bop.engine.AbstractRunningQuery.<init>(AbstractRunningQuery.java:492)
      	at com.bigdata.bop.engine.ChunkedRunningQuery.<init>(ChunkedRunningQuery.java:183)
      	... 43 more
      
      

        Activity

        Hide
        gjdev gjdev added a comment -

        Using -DtestClass=com.bigdata.rdf.sail.TestBigdataSailWithQuads when running the testcase...

        Show
        gjdev gjdev added a comment - Using -DtestClass=com.bigdata.rdf.sail.TestBigdataSailWithQuads when running the testcase...
        Hide
        bryanthompson bryanthompson added a comment -

        Added unit test and data for [1] to the CI test suite.

        com.bigdata.rdf.sail.TestTicket276
        
        Show
        bryanthompson bryanthompson added a comment - Added unit test and data for [1] to the CI test suite. com.bigdata.rdf.sail.TestTicket276
        Hide
        bryanthompson bryanthompson added a comment -

        This appears to be a bug in Constant#equals(Object o). The code was written to allow comparison with IConstantOrVariable. However, IVariable#get() always throws an UnsupportedOperationException since it is not possible to obtain the asBound value of a variable without reference to a binding set.

        I have modified Constant#equals() to return false unless the passed Object is another IConstant. I also added a fast code path for tests against self. This is sufficient to have the unit test pass. I am now running through the test suites for the SAIL to verify that this change has not broken anything else.

        Show
        bryanthompson bryanthompson added a comment - This appears to be a bug in Constant#equals(Object o). The code was written to allow comparison with IConstantOrVariable. However, IVariable#get() always throws an UnsupportedOperationException since it is not possible to obtain the asBound value of a variable without reference to a binding set. I have modified Constant#equals() to return false unless the passed Object is another IConstant. I also added a fast code path for tests against self. This is sufficient to have the unit test pass. I am now running through the test suites for the SAIL to verify that this change has not broken anything else.
        Hide
        bryanthompson bryanthompson added a comment -

        Everything appears to be working Ok.

        Committed revision 4613.

        Show
        bryanthompson bryanthompson added a comment - Everything appears to be working Ok. Committed revision 4613.

          People

          • Assignee:
            bryanthompson bryanthompson
            Reporter:
            gjdev gjdev
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: