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

FILTER FILTER != not working

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Medium
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: BLAZEGRAPH_RELEASE_1_5_2
    • Component/s: None
    • Labels:
      None

      Description

      Query:

      base <http://localhost:8000/>
      prefix owl: <http://www.w3.org/2002/07/owl#>
      prefix based: </bdm/api/appindividual/based:>
      prefix xsd: <http://www.w3.org/2001/XMLSchema#>
      prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
      prefix dc: <http://purl.org/dc/elements/1.1/>
      prefix sys: </bdm/api/kbobject/base:sys:>
      prefix s: </bdm/api/>
      prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
      prefix bds: <http://www.bigdata.com/rdf/search#>
      prefix sysd: </bdm/api/appindividual/sysd:>
      prefix base: </bdm/api/kbobject/base:base:>
      prefix skos: <http://www.w3.org/2004/02/skos/core#>
      prefix syapse: </graph/syapse#>
      
      SELECT *
      WHERE {
      
      
        ?Subject_A rdf:type / syapse:subClassOf base:Subject
        {
          FILTER NOT EXISTS { 
      
            ?Sample_B rdf:type / syapse:subClassOf base:Sample
            FILTER NOT EXISTS { 
              $j__6 rdf:type / syapse:subClassOf base:Fish .
              $j__6 syapse:partlet $j__7 .
              $j__7 $j__8 ?Sample_B
             FILTER ( $j__6 != ?Sample_B )
            }
            ?Sample_B rdf:type / syapse:subClassOf base:Sample .
            ?Sample_B syapse:partlet $j__2 .
            $j__2 $j__3 ?Subject_A
            FILTER ( ?Sample_B != ?Subject_A )
            
          }
        } UNION {
      
          ?Sample_B rdf:type / syapse:subClassOf base:Sample
        } # End Union
           OPTIONAL { syapse:unbound rdfs:label ?Sample_B  }
      }
      LIMIT 20000
      

      Error message:

      java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: java.lang.IllegalStateException: ValueExpression not set: 
      FILTER( FunctionNode(VarNode(j__6),VarNode(Sample_B))[ FunctionNode.scalarVals=null, FunctionNode.functionURI=http://www.w3.org/2005/xpath-functions#not-equal-to] )
      	at java.util.concurrent.FutureTask.report(FutureTask.java:122)
      	at java.util.concurrent.FutureTask.get(FutureTask.java:188)
      	at com.bigdata.rdf.sail.webapp.BigdataServlet.submitApiTask(BigdataServlet.java:261)
      	at com.bigdata.rdf.sail.webapp.QueryServlet.doSparqlQuery(QueryServlet.java:532)
      	at com.bigdata.rdf.sail.webapp.QueryServlet.doPost(QueryServlet.java:189)
      	at com.bigdata.rdf.sail.webapp.RESTServlet.doPost(RESTServlet.java:237)
      	at com.bigdata.rdf.sail.webapp.MultiTenancyServlet.doPost(MultiTenancyServlet.java:137)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
      	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:769)
      	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
      	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
      	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
      	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1125)
      	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
      	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
      	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1059)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
      	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
      	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
      	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
      	at org.eclipse.jetty.server.Server.handle(Server.java:497)
      	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
      	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:248)
      	at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:610)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:539)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: java.util.concurrent.ExecutionException: java.lang.IllegalStateException: ValueExpression not set: 
      FILTER( FunctionNode(VarNode(j__6),VarNode(Sample_B))[ FunctionNode.scalarVals=null, FunctionNode.functionURI=http://www.w3.org/2005/xpath-functions#not-equal-to] )
      	at java.util.concurrent.FutureTask.report(FutureTask.java:122)
      	at java.util.concurrent.FutureTask.get(FutureTask.java:188)
      	at com.bigdata.rdf.sail.webapp.QueryServlet$SparqlQueryTask.call(QueryServlet.java:725)
      	at com.bigdata.rdf.sail.webapp.QueryServlet$SparqlQueryTask.call(QueryServlet.java:549)
      	at com.bigdata.rdf.task.ApiTaskForIndexManager.call(ApiTaskForIndexManager.java:68)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
      	at com.bigdata.rdf.task.AbstractApiTask.submitApiTask(AbstractApiTask.java:365)
      	at com.bigdata.rdf.sail.webapp.BigdataServlet.submitApiTask(BigdataServlet.java:258)
      	... 26 more
      Caused by: java.lang.IllegalStateException: ValueExpression not set: 
      FILTER( FunctionNode(VarNode(j__6),VarNode(Sample_B))[ FunctionNode.scalarVals=null, FunctionNode.functionURI=http://www.w3.org/2005/xpath-functions#not-equal-to] )
      	at com.bigdata.rdf.sparql.ast.GroupMemberValueExpressionNodeBase.getRequiredValueExpression(GroupMemberValueExpressionNodeBase.java:94)
      	at com.bigdata.rdf.sparql.ast.GroupMemberValueExpressionNodeBase.getConsumedVars(GroupMemberValueExpressionNodeBase.java:105)
      	at com.bigdata.rdf.sparql.ast.StaticAnalysis.getBoundFilters(StaticAnalysis.java:1874)
      	at com.bigdata.rdf.sparql.ast.StaticAnalysis.getPreFilters(StaticAnalysis.java:1656)
      	at com.bigdata.rdf.sparql.ast.optimizers.ASTJoinOrderByTypeOptimizer.optimizeJoinGroup(ASTJoinOrderByTypeOptimizer.java:266)
      	at com.bigdata.rdf.sparql.ast.optimizers.AbstractJoinGroupOptimizer.optimize(AbstractJoinGroupOptimizer.java:157)
      	at com.bigdata.rdf.sparql.ast.optimizers.AbstractJoinGroupOptimizer.optimize(AbstractJoinGroupOptimizer.java:278)
      	at com.bigdata.rdf.sparql.ast.optimizers.AbstractJoinGroupOptimizer.optimize(AbstractJoinGroupOptimizer.java:193)
      	at com.bigdata.rdf.sparql.ast.optimizers.AbstractJoinGroupOptimizer.optimize(AbstractJoinGroupOptimizer.java:185)
      	at com.bigdata.rdf.sparql.ast.optimizers.AbstractJoinGroupOptimizer.optimize(AbstractJoinGroupOptimizer.java:175)
      	at com.bigdata.rdf.sparql.ast.optimizers.AbstractJoinGroupOptimizer.optimize(AbstractJoinGroupOptimizer.java:175)
      	at com.bigdata.rdf.sparql.ast.optimizers.AbstractJoinGroupOptimizer.optimize(AbstractJoinGroupOptimizer.java:97)
      	at com.bigdata.rdf.sparql.ast.optimizers.ASTOptimizerList.optimize(ASTOptimizerList.java:103)
      	at com.bigdata.rdf.sparql.ast.eval.AST2BOpUtility.convert(AST2BOpUtility.java:229)
      	at com.bigdata.rdf.sparql.ast.eval.ASTEvalHelper.evaluateTupleQuery(ASTEvalHelper.java:244)
      	at com.bigdata.rdf.sail.BigdataSailTupleQuery.evaluate(BigdataSailTupleQuery.java:93)
      	at com.bigdata.rdf.sail.BigdataSailTupleQuery.evaluate(BigdataSailTupleQuery.java:75)
      	at org.openrdf.repository.sail.SailTupleQuery.evaluate(SailTupleQuery.java:75)
      	at com.bigdata.rdf.sail.webapp.BigdataRDFContext$TupleQueryTask.doQuery(BigdataRDFContext.java:1450)
      	at com.bigdata.rdf.sail.webapp.BigdataRDFContext$AbstractQueryTask.innerCall(BigdataRDFContext.java:1310)
      	at com.bigdata.rdf.sail.webapp.BigdataRDFContext$AbstractQueryTask.call(BigdataRDFContext.java:1275)
      	at com.bigdata.rdf.sail.webapp.BigdataRDFContext$AbstractQueryTask.call(BigdataRDFContext.java:517)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      	... 1 more
      

      I suspect this needs some data, and I am working on simplifying the example (I have already deleted about 80% of the actual query)

        Attachments

          Activity

            People

            Assignee:
            michaelschmidt michaelschmidt
            Reporter:
            jjc Jeremy Carroll
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: