MaastrichtU-IDS / federatedQueryKG

This repository is a workplace for COST Action Hackathon event on Federated Query over Knowledge Graphs which will happen on 25-27 April in Izmir Turkey.
MIT License
11 stars 3 forks source link

error on property path in query #8

Closed micheldumontier closed 1 year ago

micheldumontier commented 1 year ago
micheldumontier@FSELAP0508:~/code/external/HeFQUIN$ java -cp target/HeFQUIN-0.0.1-SNAPSHOT.jar se.liu.ida.hefquin.cli.RunQueryWithoutSrcSel --federationDescription=ExampleFederation.ttl --query=bio2rdf-drug-model-phenotypes.rq
Getting the variables from arbitrary SPARQL patterns is an open TODO (type of Jena Op in the current case: org.apache.jena.sparql.algebra.op.OpSequence).
java.lang.UnsupportedOperationException: Getting the variables from arbitrary SPARQL patterns is an open TODO (type of Jena Op in the current case: org.apache.jena.sparql.algebra.op.OpSequence).
        at se.liu.ida.hefquin.engine.query.impl.QueryPatternUtils.getVariablesInPattern(QueryPatternUtils.java:355)
        at se.liu.ida.hefquin.engine.query.impl.QueryPatternUtils.getVariablesInPattern(QueryPatternUtils.java:304)
        at se.liu.ida.hefquin.engine.queryplan.executable.impl.ops.BaseForExecOpBindJoinSPARQL.<init>(BaseForExecOpBindJoinSPARQL.java:41)
        at se.liu.ida.hefquin.engine.queryplan.executable.impl.ops.ExecOpBindJoinSPARQLwithFILTER.<init>(ExecOpBindJoinSPARQLwithFILTER.java:49)
        at se.liu.ida.hefquin.engine.queryplan.physical.impl.PhysicalOpBindJoinWithFILTER.createExecOp(PhysicalOpBindJoinWithFILTER.java:110)
        at se.liu.ida.hefquin.engine.queryplan.physical.impl.PhysicalOpBindJoinWithFILTER.createExecOp(PhysicalOpBindJoinWithFILTER.java:102)
        at se.liu.ida.hefquin.engine.queryplan.physical.impl.PhysicalOpBindJoinWithFILTER.createExecOp(PhysicalOpBindJoinWithFILTER.java:1)
        at se.liu.ida.hefquin.engine.queryproc.impl.compiler.TaskBasedQueryPlanCompilerBase$Worker._createTasks(TaskBasedQueryPlanCompilerBase.java:71)
        at se.liu.ida.hefquin.engine.queryproc.impl.compiler.PushBasedQueryPlanCompilerImpl$Worker.createTasks(PushBasedQueryPlanCompilerImpl.java:100)
        at se.liu.ida.hefquin.engine.queryproc.impl.compiler.TaskBasedQueryPlanCompilerBase.createTasks(TaskBasedQueryPlanCompilerBase.java:39)
        at se.liu.ida.hefquin.engine.queryproc.impl.compiler.PushBasedQueryPlanCompilerImpl.createTasks(PushBasedQueryPlanCompilerImpl.java:63)
        at se.liu.ida.hefquin.engine.queryproc.impl.compiler.TaskBasedQueryPlanCompilerBase.compile(TaskBasedQueryPlanCompilerBase.java:31)
        at se.liu.ida.hefquin.engine.queryproc.impl.QueryProcessorImpl.processQuery(QueryProcessorImpl.java:64)
        at se.liu.ida.hefquin.jenaintegration.sparql.engine.main.OpExecutorHeFQUIN$MainQueryIterator.nextStage(OpExecutorHeFQUIN.java:227)
        at org.apache.jena.sparql.engine.iterator.QueryIterRepeatApply.makeNextStage(QueryIterRepeatApply.java:100)
        at org.apache.jena.sparql.engine.iterator.QueryIterRepeatApply.hasNextBinding(QueryIterRepeatApply.java:60)
        at org.apache.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(QueryIteratorBase.java:114)
        at org.apache.jena.sparql.engine.iterator.QueryIteratorWrapper.hasNextBinding(QueryIteratorWrapper.java:38)
        at org.apache.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(QueryIteratorBase.java:114)
        at org.apache.jena.sparql.engine.iterator.QueryIteratorWrapper.hasNextBinding(QueryIteratorWrapper.java:38)
        at org.apache.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(QueryIteratorBase.java:114)
        at org.apache.jena.sparql.engine.ResultSetStream.hasNext(ResultSetStream.java:64)
        at org.apache.jena.sparql.engine.ResultSetCheckCondition.hasNext(ResultSetCheckCondition.java:55)
        at org.apache.jena.sparql.resultset.ResultSetMem.<init>(ResultSetMem.java:89)
        at org.apache.jena.query.ResultSetFactory.makeRewindable(ResultSetFactory.java:311)
        at org.apache.jena.query.ResultSet.rewindable(ResultSet.java:83)
        at org.apache.jena.riot.resultset.rw.ResultSetWriterText.output$(ResultSetWriterText.java:132)
        at org.apache.jena.riot.resultset.rw.ResultSetWriterText.output(ResultSetWriterText.java:120)
        at org.apache.jena.riot.resultset.rw.ResultSetWriterText.output(ResultSetWriterText.java:116)
        at org.apache.jena.riot.resultset.rw.ResultSetWriterText.write(ResultSetWriterText.java:59)
        at org.apache.jena.riot.resultset.rw.ResultsWriter.write(ResultsWriter.java:156)
        at org.apache.jena.riot.resultset.rw.ResultsWriter.write(ResultsWriter.java:126)
        at org.apache.jena.sparql.util.QueryExecUtils.outputResultSet(QueryExecUtils.java:133)
        at org.apache.jena.sparql.util.QueryExecUtils.doSelectQuery(QueryExecUtils.java:150)
        at org.apache.jena.sparql.util.QueryExecUtils.executeQuery(QueryExecUtils.java:81)
        at se.liu.ida.hefquin.engine.HeFQUINEngineBuilder$MyEngine.executeQuery(HeFQUINEngineBuilder.java:169)
        at se.liu.ida.hefquin.cli.RunQueryWithoutSrcSel.exec(RunQueryWithoutSrcSel.java:105)
        at org.apache.jena.cmd.CmdMain.mainMethod(CmdMain.java:92)
        at org.apache.jena.cmd.CmdMain.mainRun(CmdMain.java:58)
        at org.apache.jena.cmd.CmdMain.mainRun(CmdMain.java:45)
        at se.liu.ida.hefquin.cli.RunQueryWithoutSrcSel.main(RunQueryWithoutSrcSel.java:49)
PREFIX mp: <http://purl.obolibrary.org/obo/MP_>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX dct: <http://purl.org/dc/terms/>
SELECT *
{
    SERVICE <http://bio2rdf.org/sparql> {
     ?drug <http://bio2rdf.org/drugbank_vocabulary:target> ?target .
     FILTER(?drug = <http://bio2rdf.org/drugbank:DB00619>)
     ?target <http://bio2rdf.org/drugbank_vocabulary:x-hgnc> ?hgnc .
   }
  SERVICE <http://bio2rdf.org/sparql> {
    ?hgnc <http://bio2rdf.org/hgnc_vocabulary:x-mgi> ?marker .
   }    
  SERVICE <http://bio2rdf.org/sparql> {
    ?model <http://bio2rdf.org/mgi_vocabulary:marker> ?marker .
    ?model <http://bio2rdf.org/mgi_vocabulary:allele> ?all .
    ?all <http://bio2rdf.org/mgi_vocabulary:allele-attribute> ?allele_type .
    ?model <http://bio2rdf.org/mgi_vocabulary:phenotype> ?phenotypes .
    #FILTER (str(?allele_type) = "Null/knockout") 
  }

    SERVICE <http://bio2rdf.org/sparql> {
    ?mp owl:sameAs ?phenotypes . 
    ?mp rdfs:label ?phenotype_label .
    ?mp rdfs:subClassOf* mp:0005385
   }
 }
PREFIX rdf:    <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX xsd:    <http://www.w3.org/2001/XMLSchema#>
PREFIX fd:     <http://www.example.org/se/liu/ida/hefquin/fd#>
PREFIX ex:     <http://example.org/>

ex:bio2rdfSPARQL
      a            fd:FederationMember ;
      fd:interface [ a                  fd:SPARQLEndpointInterface ;
                     fd:endpointAddress <http://bio2rdf.org/sparql> ] .
hartig commented 1 year ago

Fixed by https://github.com/LiUSemWeb/HeFQUIN/pull/290