Details

      Description

      This query:

      SELECT * WHERE {
        ?item p:P2052/psv:P2052/wikibase:quantityUnit ?speedUnit .
        ?speedUnit !wdt:P279* wdt:Q15222637 .
      } LIMIT 10
      

      produces:

      SPARQL-QUERY: queryStr=SELECT * WHERE {
        ?item p:P2052/psv:P2052/wikibase:quantityUnit ?speedUnit .
        ?speedUnit !wdt:P279* wdt:Q15222637 .
      } LIMIT 10
      java.util.concurrent.ExecutionException: java.lang.ClassCastException: com.bigdata.rdf.sparql.ast.VarNode cannot be cast to com.bigdata.rdf.sparql.ast.PathNode$PathOneInPropertySet
      	at java.util.concurrent.FutureTask.report(FutureTask.java:122)
      	at java.util.concurrent.FutureTask.get(FutureTask.java:192)
      	at com.bigdata.rdf.sail.webapp.BigdataServlet.submitApiTask(BigdataServlet.java:281)
      	at com.bigdata.rdf.sail.webapp.QueryServlet.doSparqlQuery(QueryServlet.java:653)
      	at com.bigdata.rdf.sail.webapp.QueryServlet.doGet(QueryServlet.java:288)
      	at com.bigdata.rdf.sail.webapp.RESTServlet.doGet(RESTServlet.java:240)
      	at com.bigdata.rdf.sail.webapp.MultiTenancyServlet.doGet(MultiTenancyServlet.java:271)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
      	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808)
      	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587)
      	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:1127)
      	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:1061)
      	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:310)
      	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
      	at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: java.lang.ClassCastException: com.bigdata.rdf.sparql.ast.VarNode cannot be cast to com.bigdata.rdf.sparql.ast.PathNode$PathOneInPropertySet
      	at com.bigdata.rdf.sail.sparql.TriplePatternExprBuilder.visit(TriplePatternExprBuilder.java:289)
      	at com.bigdata.rdf.sail.sparql.ast.ASTPathElt.jjtAccept(ASTPathElt.java:30)
      	at com.bigdata.rdf.sail.sparql.TriplePatternExprBuilder.visit(TriplePatternExprBuilder.java:268)
      	at com.bigdata.rdf.sail.sparql.TriplePatternExprBuilder.visit(TriplePatternExprBuilder.java:82)
      	at com.bigdata.rdf.sail.sparql.ast.ASTPathSequence.jjtAccept(ASTPathSequence.java:26)
      	at com.bigdata.rdf.sail.sparql.TriplePatternExprBuilder.visit(TriplePatternExprBuilder.java:250)
      	at com.bigdata.rdf.sail.sparql.TriplePatternExprBuilder.visit(TriplePatternExprBuilder.java:82)
      	at com.bigdata.rdf.sail.sparql.ast.ASTPathAlternative.jjtAccept(ASTPathAlternative.java:23)
      	at com.bigdata.rdf.sail.sparql.TriplePatternExprBuilder.visit(TriplePatternExprBuilder.java:130)
      	at com.bigdata.rdf.sail.sparql.ast.ASTPropertyListPath.jjtAccept(ASTPropertyListPath.java:26)
      	at com.bigdata.rdf.sail.sparql.ast.SimpleNode.childrenAccept(SimpleNode.java:153)
      	at com.bigdata.rdf.sail.sparql.ASTVisitorBase.visit(ASTVisitorBase.java:838)
      	at com.bigdata.rdf.sail.sparql.ast.ASTTriplesSameSubjectPath.jjtAccept(ASTTriplesSameSubjectPath.java:23)
      	at com.bigdata.rdf.sail.sparql.ast.SimpleNode.childrenAccept(SimpleNode.java:153)
      	at com.bigdata.rdf.sail.sparql.ASTVisitorBase.visit(ASTVisitorBase.java:274)
      	at com.bigdata.rdf.sail.sparql.ast.ASTBasicGraphPattern.jjtAccept(ASTBasicGraphPattern.java:24)
      	at com.bigdata.rdf.sail.sparql.ast.SimpleNode.childrenAccept(SimpleNode.java:153)
      	at com.bigdata.rdf.sail.sparql.ASTVisitorBase.visit(ASTVisitorBase.java:442)
      	at com.bigdata.rdf.sail.sparql.GroupGraphPatternBuilder.visit(GroupGraphPatternBuilder.java:158)
      	at com.bigdata.rdf.sail.sparql.GroupGraphPatternBuilder.visit(GroupGraphPatternBuilder.java:95)
      	at com.bigdata.rdf.sail.sparql.ast.ASTGraphPatternGroup.jjtAccept(ASTGraphPatternGroup.java:24)
      	at com.bigdata.rdf.sail.sparql.BigdataExprBuilder.handleWhereClause(BigdataExprBuilder.java:738)
      	at com.bigdata.rdf.sail.sparql.BigdataExprBuilder.visit(BigdataExprBuilder.java:179)
      	at com.bigdata.rdf.sail.sparql.BigdataExprBuilder.visit(BigdataExprBuilder.java:120)
      	at com.bigdata.rdf.sail.sparql.ast.ASTSelectQuery.jjtAccept(ASTSelectQuery.java:25)
      	at com.bigdata.rdf.sail.sparql.BigdataExprBuilder.visit(BigdataExprBuilder.java:149)
      	at com.bigdata.rdf.sail.sparql.BigdataExprBuilder.visit(BigdataExprBuilder.java:120)
      	at com.bigdata.rdf.sail.sparql.ast.ASTQueryContainer.jjtAccept(ASTQueryContainer.java:25)
      	at com.bigdata.rdf.sail.sparql.Bigdata2ASTSPARQLParser.buildQueryModel(Bigdata2ASTSPARQLParser.java:433)
      	at com.bigdata.rdf.sail.sparql.Bigdata2ASTSPARQLParser.parseQuery2(Bigdata2ASTSPARQLParser.java:359)
      	at com.bigdata.rdf.sail.webapp.QueryServlet$SparqlQueryTask.call(QueryServlet.java:716)
      	at com.bigdata.rdf.sail.webapp.QueryServlet$SparqlQueryTask.call(QueryServlet.java:670)
      	at com.bigdata.rdf.task.ApiTaskForIndexManager.call(ApiTaskForIndexManager.java:68)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	... 1 more
      

        Activity

        Hide
        stasmalyshev stasmalyshev added a comment -

        Not sure maybe syntax is not right? https://www.w3.org/TR/sparql11-query/#propertypaths does not mention negation and * together, so maybe it's not supported?

        Show
        stasmalyshev stasmalyshev added a comment - Not sure maybe syntax is not right? https://www.w3.org/TR/sparql11-query/#propertypaths does not mention negation and * together, so maybe it's not supported?
        Hide
        michaelschmidt michaelschmidt added a comment -

        Yes, I believe it's a syntax problem. Query should probably be

        SELECT * WHERE {
          ?item p:P2052/psv:P2052/wikibase:quantityUnit ?speedUnit .
          ?speedUnit (!wdt:P279)* wdt:Q15222637 .
        } LIMIT 10
        

        I added a test case, https://github.com/blazegraph/bigdata/pull/505, and validated that the query, when written as above, indeed succeeds to compute the result.

        Show
        michaelschmidt michaelschmidt added a comment - Yes, I believe it's a syntax problem. Query should probably be SELECT * WHERE { ?item p:P2052/psv:P2052/wikibase:quantityUnit ?speedUnit . ?speedUnit (!wdt:P279)* wdt:Q15222637 . } LIMIT 10 I added a test case, https://github.com/blazegraph/bigdata/pull/505 , and validated that the query, when written as above, indeed succeeds to compute the result.
        Hide
        michaelschmidt michaelschmidt added a comment -

        Merged down to master (note that this is only a test case, no code changes required).

        Show
        michaelschmidt michaelschmidt added a comment - Merged down to master (note that this is only a test case, no code changes required).
        Hide
        beebs Brad Bebee added a comment -

        Cherry-picked test cases into 2.1.5.

        Show
        beebs Brad Bebee added a comment - Cherry-picked test cases into 2.1.5.

          People

          • Assignee:
            michaelschmidt michaelschmidt
            Reporter:
            stasmalyshev stasmalyshev
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: