Closed Yotlan closed 1 year ago
With the following query
PREFIX bsbm: <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/vocabulary/>
SELECT *
WHERE {
?product rdf:type ?localProductType .
?localProductType owl:sameAs bsbm:ProductType662 .
}
ORDER BY ?product
LIMIT 10
Test on endpoint http://www.ratingsite0.fr/ and http://www.vendor0.fr/
Give the following result (with Virtuoso and CostFed)
With the previous query, test on endpoint from http://www.ratingsite0.fr/ to http://www.ratingsite9.fr/ and from http://www.vendor0.fr/ to http://www.vendor9.fr/
Give the same result as previous
With the following query
PREFIX bsbm: <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/vocabulary/>
SELECT *
WHERE {
?product rdfs:label ?label .
?product rdf:type ?localProductType .
?localProductType owl:sameAs bsbm:ProductType662 .
}
ORDER BY ?product
LIMIT 10
Test with the same endpoint as previous step
Give the same result as the previous step
With the following query
PREFIX bsbm: <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/vocabulary/>
SELECT *
WHERE {
?product rdfs:label ?label .
?product rdf:type ?localProductType .
?localProductType owl:sameAs bsbm:ProductType662 .
?product bsbm:productFeature ?localProductFeature1 .
}
ORDER BY ?product
LIMIT 10
Test on the same endpoint as the previous step
Give the following result (with Virtuoso and CostFed)
With the following query
PREFIX bsbm: <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/vocabulary/>
SELECT *
WHERE {
?product rdfs:label ?label .
?product rdf:type ?localProductType .
?localProductType owl:sameAs bsbm:ProductType662 .
?product bsbm:productFeature ?localProductFeature1 .
?localProductFeature1 owl:sameAs bsbm:ProductFeature16105 .
}
ORDER BY ?product
LIMIT 10
Test on the same endpoints as the previous step
Give the following result (with Virtuoso and CostFed)
With the following query
PREFIX bsbm: <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/vocabulary/>
SELECT *
WHERE {
?product rdfs:label ?label .
?product rdf:type ?localProductType .
?localProductType owl:sameAs bsbm:ProductType662 .
?product bsbm:productFeature ?localProductFeature1 .
?localProductFeature1 owl:sameAs bsbm:ProductFeature16105 .
?product bsbm:productFeature ?localProductFeature2 .
}
ORDER BY ?product
LIMIT 10
Test on the same endpoint as the previous step
Give the following result (with Virtuoso and CostFed)
With the following query
PREFIX bsbm: <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/vocabulary/>
SELECT *
WHERE {
?product rdfs:label ?label .
?product rdf:type ?localProductType .
?localProductType owl:sameAs bsbm:ProductType662 .
?product bsbm:productFeature ?localProductFeature1 .
?localProductFeature1 owl:sameAs bsbm:ProductFeature16105 .
?product bsbm:productFeature ?localProductFeature2 .
?localProductFeature2 owl:sameAs bsbm:ProductFeature20768 .
}
ORDER BY ?product
LIMIT 10
Test on the same endpoints as the previous step
Give the following result (with Virtuoso and CostFed)
product | label | localProductType | localProductFeature1 | localProductFeature2 |
---|---|---|---|---|
http://www.vendor0.fr/Product95198 | Post | http://www.vendor0.fr/ProductType662 | http://www.vendor0.fr/ProductFeature16105 | http://www.vendor0.fr/ProductFeature20768 |
http://www.vendor8.fr/Product95198 | Post | http://www.vendor8.fr/ProductType662 | http://www.vendor8.fr/ProductFeature16105 | http://www.vendor8.fr/ProductFeature20768 |
With the following query
PREFIX bsbm: <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/vocabulary/>
SELECT *
WHERE {
?product rdfs:label ?label .
?product rdf:type ?localProductType .
?localProductType owl:sameAs bsbm:ProductType662 .
?product bsbm:productFeature ?localProductFeature1 .
?localProductFeature1 owl:sameAs bsbm:ProductFeature16105 .
?product bsbm:productFeature ?localProductFeature2 .
?localProductFeature2 owl:sameAs bsbm:ProductFeature20768 .
?product bsbm:productPropertyNumeric1 ?value1 .
}
ORDER BY ?product
LIMIT 10
Test on the same endpoint as the previous step
Give the following result
product | label | localProductType | localProductFeature1 | localProductFeature2 | value1 |
---|---|---|---|---|---|
http://www.vendor0.fr/Product95198 | Post | http://www.vendor0.fr/ProductType662 | http://www.vendor0.fr/ProductFeature16105 | http://www.vendor0.fr/ProductFeature20768 | 996 |
http://www.vendor8.fr/Product95198 | Post | http://www.vendor8.fr/ProductType662 | http://www.vendor8.fr/ProductFeature16105 | http://www.vendor8.fr/ProductFeature20768 | 996 |
With the following query
PREFIX bsbm: <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/vocabulary/>
SELECT *
WHERE {
?product rdfs:label ?label .
?product rdf:type ?localProductType .
?localProductType owl:sameAs bsbm:ProductType662 .
?product bsbm:productFeature ?localProductFeature1 .
?localProductFeature1 owl:sameAs bsbm:ProductFeature16105 .
?product bsbm:productFeature ?localProductFeature2 .
?localProductFeature2 owl:sameAs bsbm:ProductFeature20768 .
?product bsbm:productPropertyNumeric1 ?value1 .
FILTER (?value1 > "801"^^xsd:integer)
}
ORDER BY ?product
LIMIT 10
Test on the same endpoint as the previous step
Give the following result (with Virtuoso)
product | label | localProductType | localProductFeature1 | localProductFeature2 | value1 |
---|---|---|---|---|---|
http://www.vendor0.fr/Product95198 | Post | http://www.vendor0.fr/ProductType662 | http://www.vendor0.fr/ProductFeature16105 | http://www.vendor0.fr/ProductFeature20768 | 996 |
http://www.vendor8.fr/Product95198 | Post | http://www.vendor8.fr/ProductType662 | http://www.vendor8.fr/ProductFeature16105 | http://www.vendor8.fr/ProductFeature20768 | 996 |
This query failed with CostFed and return the following error
Exception in thread "Evaluation Scheduler_15" org.apache.commons.lang3.NotImplementedException: FedXStatementPattern.evaluate(List<BindingSet>)
at com.fluidops.fedx.algebra.FedXStatementPattern.evaluate(FedXStatementPattern.java:227)
at com.fluidops.fedx.algebra.FedXStatementPattern.evaluate(FedXStatementPattern.java:214)
at org.aksw.simba.quetsal.core.TBSSFederationEvalStrategy.evaluate(TBSSFederationEvalStrategy.java:57)
at org.aksw.simba.quetsal.core.TBSSFederationEvalStrategy$AsyncEval.call(TBSSFederationEvalStrategy.java:120)
at org.aksw.simba.quetsal.core.TBSSFederationEvalStrategy$AsyncEval.call(TBSSFederationEvalStrategy.java:1)
at com.fluidops.fedx.evaluation.concurrent.Async.run(Async.java:20)
at com.fluidops.fedx.evaluation.concurrent.ControlledWorkerScheduler.threadProc(ControlledWorkerScheduler.java:105)
at com.fluidops.fedx.evaluation.concurrent.ControlledWorkerScheduler.access$0(ControlledWorkerScheduler.java:58)
at com.fluidops.fedx.evaluation.concurrent.ControlledWorkerScheduler$1.run(ControlledWorkerScheduler.java:50)
at java.base/java.lang.Thread.run(Thread.java:833)
at com.fluidops.fedx.evaluation.iterator.QueueIterator.checkException(QueueIterator.java:105)
at com.fluidops.fedx.evaluation.iterator.QueueIterator.getNextElement(QueueIterator.java:41)
at com.fluidops.fedx.evaluation.iterator.RestartableLookAheadIteration.lookAhead(RestartableLookAheadIteration.java:50)
at com.fluidops.fedx.evaluation.iterator.RestartableLookAheadIteration.hasNext(RestartableLookAheadIteration.java:21)
at com.fluidops.fedx.evaluation.iterator.QueueIteration.getNextElement(QueueIteration.java:40)
at com.fluidops.fedx.evaluation.iterator.RestartableLookAheadIteration.lookAhead(RestartableLookAheadIteration.java:50)
at com.fluidops.fedx.evaluation.iterator.RestartableLookAheadIteration.hasNext(RestartableLookAheadIteration.java:21)
at org.aksw.simba.quetsal.core.evaluation.BindJoinImpl.getNextElement(BindJoinImpl.java:100)
at org.aksw.simba.quetsal.core.evaluation.BindJoinImpl.getNextElement(BindJoinImpl.java:1)
at com.fluidops.fedx.evaluation.iterator.RestartableLookAheadIteration.lookAhead(RestartableLookAheadIteration.java:50)
at com.fluidops.fedx.evaluation.iterator.RestartableLookAheadIteration.hasNext(RestartableLookAheadIteration.java:21)
at org.aksw.simba.quetsal.core.evaluation.BindJoinImpl.handleBindings(BindJoinImpl.java:84)
at org.aksw.simba.quetsal.core.evaluation.BindJoinImpl$AsyncBindingTask.callAsync(BindJoinImpl.java:136)
at org.aksw.simba.quetsal.core.evaluation.BindJoinImpl$AsyncBindingTask.callAsync(BindJoinImpl.java:1)
at com.fluidops.fedx.evaluation.concurrent.Async.run(Async.java:25)
at com.fluidops.fedx.evaluation.concurrent.ControlledWorkerScheduler.threadProc(ControlledWorkerScheduler.java:105)
at com.fluidops.fedx.evaluation.concurrent.ControlledWorkerScheduler.access$0(ControlledWorkerScheduler.java:58)
at com.fluidops.fedx.evaluation.concurrent.ControlledWorkerScheduler$1.run(ControlledWorkerScheduler.java:50)
at java.base/java.lang.Thread.run(Thread.java:833)
Remove NotImplentedException from FedXStatementPattern.java and it work and give the same result
Test if all queries work
An example of the query 2
PREFIX bsbm-inst: <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/>
PREFIX bsbm: <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/vocabulary/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
SELECT DISTINCT ?label ?comment ?producer ?ProductFeatureLabel ?propertyTextual1 ?propertyTextual2 ?propertyTextual3 ?propertyNumeric1 ?propertyNumeric2 ?propertyTextual4 ?propertyTextual5 ?propertyNumeric4 WHERE {
# const bsbm:Product113179
?localProduct owl:sameAs bsbm:Product113179 .
?localProduct rdfs:label ?label .
?localProduct rdfs:comment ?comment .
?localProduct bsbm:producer ?p .
?p rdfs:label ?producer .
#?localProduct dc:publisher ?p .
?localProduct bsbm:productFeature ?localProductFeature1 .
?localProductFeature1 owl:sameAs ?ProductFeature1 .
?localProductFeature1 rdfs:label ?ProductFeatureLabel .
?localProduct bsbm:productPropertyTextual1 ?propertyTextual1 .
?localProduct bsbm:productPropertyTextual2 ?propertyTextual2 .
?localProduct bsbm:productPropertyTextual3 ?propertyTextual3 .
?localProduct bsbm:productPropertyNumeric1 ?propertyNumeric1 .
?localProduct bsbm:productPropertyNumeric2 ?propertyNumeric2 .
OPTIONAL { ?localProduct bsbm:productPropertyTextual4 ?propertyTextual4 }
OPTIONAL { ?localProduct bsbm:productPropertyTextual5 ?propertyTextual5 }
OPTIONAL { ?localProduct bsbm:productPropertyNumeric4 ?propertyNumeric4 }
}
This query give the following stack trace
org.eclipse.rdf4j.query.QueryEvaluationException: @ sparql_localhost:34201_sparql?default-graph-uri=www.ratingsite8.fr_ - n/a. Subquery: SELECT ?propertyTextual5 WHERE { <http://www.ratingsite0.fr/Product113179> <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/vocabulary/productPropertyTextual5> ?propertyTextual5 . }
at org.eclipse.rdf4j.http.client.SPARQLProtocolSession.execute(SPARQLProtocolSession.java:1106)
at org.eclipse.rdf4j.http.client.SPARQLProtocolSession.executeOK(SPARQLProtocolSession.java:1046)
at org.eclipse.rdf4j.http.client.SPARQLProtocolSession.sendTupleQueryViaHttp(SPARQLProtocolSession.java:822)
at org.eclipse.rdf4j.http.client.SPARQLProtocolSession.getBackgroundTupleQueryResult(SPARQLProtocolSession.java:716)
at org.eclipse.rdf4j.http.client.SPARQLProtocolSession.sendTupleQuery(SPARQLProtocolSession.java:377)
at org.eclipse.rdf4j.repository.sparql.query.SPARQLTupleQuery.evaluate(SPARQLTupleQuery.java:43)
at com.fluidops.fedx.evaluation.SparqlTripleSource.getStatements(SparqlTripleSource.java:95)
at com.fluidops.fedx.evaluation.union.ParallelPreparedUnionTask.call(ParallelPreparedUnionTask.java:54)
at com.fluidops.fedx.evaluation.union.ParallelPreparedUnionTask.call(ParallelPreparedUnionTask.java:1)
at com.fluidops.fedx.evaluation.concurrent.Async.run(Async.java:20)
at com.fluidops.fedx.evaluation.concurrent.ControlledWorkerScheduler.threadProc(ControlledWorkerScheduler.java:105)
at com.fluidops.fedx.evaluation.concurrent.ControlledWorkerScheduler.access$0(ControlledWorkerScheduler.java:58)
at com.fluidops.fedx.evaluation.concurrent.ControlledWorkerScheduler$1.run(ControlledWorkerScheduler.java:50)
at java.base/java.lang.Thread.run(Thread.java:833)
at com.fluidops.fedx.evaluation.iterator.QueueIterator.getNextElement(QueueIterator.java:41)
at com.fluidops.fedx.evaluation.iterator.RestartableLookAheadIteration.lookAhead(RestartableLookAheadIteration.java:50)
at com.fluidops.fedx.evaluation.iterator.RestartableLookAheadIteration.hasNext(RestartableLookAheadIteration.java:21)
at com.fluidops.fedx.evaluation.union.UnionExecutorBase.getNextElement(UnionExecutorBase.java:111)
at org.eclipse.rdf4j.common.iteration.LookAheadIteration.lookAhead(LookAheadIteration.java:90)
at org.eclipse.rdf4j.common.iteration.LookAheadIteration.hasNext(LookAheadIteration.java:52)
at org.eclipse.rdf4j.query.algebra.evaluation.iterator.LeftJoinIterator.getNextElement(LeftJoinIterator.java:70)
at org.eclipse.rdf4j.query.algebra.evaluation.iterator.LeftJoinIterator.getNextElement(LeftJoinIterator.java:23)
at org.eclipse.rdf4j.common.iteration.LookAheadIteration.lookAhead(LookAheadIteration.java:90)
at org.eclipse.rdf4j.common.iteration.LookAheadIteration.hasNext(LookAheadIteration.java:52)
at org.eclipse.rdf4j.query.algebra.evaluation.iterator.LeftJoinIterator.getNextElement(LeftJoinIterator.java:70)
at org.eclipse.rdf4j.query.algebra.evaluation.iterator.LeftJoinIterator.getNextElement(LeftJoinIterator.java:23)
at org.eclipse.rdf4j.common.iteration.LookAheadIteration.lookAhead(LookAheadIteration.java:90)
at org.eclipse.rdf4j.common.iteration.LookAheadIteration.hasNext(LookAheadIteration.java:52)
at org.eclipse.rdf4j.common.iteration.ConvertingIteration.hasNext(ConvertingIteration.java:68)
at org.eclipse.rdf4j.common.iteration.IterationWrapper.hasNext(IterationWrapper.java:67)
at org.eclipse.rdf4j.common.iteration.FilterIteration.findNextElement(FilterIteration.java:81)
at org.eclipse.rdf4j.common.iteration.FilterIteration.hasNext(FilterIteration.java:47)
at org.eclipse.rdf4j.common.iteration.IterationWrapper.hasNext(IterationWrapper.java:67)
at org.eclipse.rdf4j.sail.helpers.SailBaseIteration.hasNext(SailBaseIteration.java:48)
at org.eclipse.rdf4j.common.iteration.IterationWrapper.hasNext(IterationWrapper.java:67)
at org.aksw.simba.start.QueryEvaluation.evaluate(QueryEvaluation.java:172)
at org.aksw.simba.start.QueryEvaluation.multyEvaluate(QueryEvaluation.java:216)
at org.aksw.simba.start.QueryEvaluation.main(QueryEvaluation.java:123)
An example of the query 4
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX bsbm: <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/vocabulary/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
SELECT DISTINCT ?product ?label ?propertyTextual WHERE {
{
?product rdfs:label ?label .
# const!* bsbm:ProductType393
?product rdf:type ?localProductType .
?localProductType owl:sameAs bsbm:ProductType393 .
# const!* bsbm:ProductFeature8110
?product bsbm:productFeature ?localProductFeature1 .
?localProductFeature1 owl:sameAs bsbm:ProductFeature8110.
# const** bsbm:ProductFeature10515 != bsbm:ProductFeature8110
?product bsbm:productFeature ?localProductFeature2 .
?localProductFeature2 owl:sameAs bsbm:ProductFeature10515.
?product bsbm:productPropertyTextual1 ?propertyTextual .
?product bsbm:productPropertyNumeric1 ?p1 .
# const** "898.0"^^xsd:double < ?p1
FILTER ( ?p1 > "898.0"^^xsd:double )
} UNION {
?product rdfs:label ?label .
# const!* bsbm:ProductType393
?product rdf:type ?localProductType .
?localProductType owl:sameAs bsbm:ProductType393 .
# const!* bsbm:ProductFeature8110
?product bsbm:productFeature ?localProductFeature1 .
?localProductFeature1 owl:sameAs bsbm:ProductFeature8110 .
# const* bsbm:ProductFeature26698 != bsbm:ProductFeature10515, bsbm:ProductFeature8110
?product bsbm:productFeature ?localProductFeature3 .
?localProductFeature3 owl:sameAs bsbm:ProductFeature26698 .
?product bsbm:productPropertyTextual1 ?propertyTextual .
?product bsbm:productPropertyNumeric2 ?p2 .
# const "783.0"^^xsd:double < ?p2
FILTER ( ?p2 > "783.0"^^xsd:double )
}
}
##ORDER BY ?label
##OFFSET 5
LIMIT 10
This query give the following stack trace
org.eclipse.rdf4j.query.QueryEvaluationException: com.fluidops.fedx.exception.FedXRuntimeException: Type StatementPattern not supported for cost estimation. If you run into this, please report a bug.
at org.eclipse.rdf4j.repository.sail.SailTupleQuery.evaluate(SailTupleQuery.java:64)
at org.aksw.simba.start.QueryEvaluation.evaluate(QueryEvaluation.java:168)
at org.aksw.simba.start.QueryEvaluation.multyEvaluate(QueryEvaluation.java:216)
at org.aksw.simba.start.QueryEvaluation.main(QueryEvaluation.java:123)
Caused by: org.eclipse.rdf4j.sail.SailException: com.fluidops.fedx.exception.FedXRuntimeException: Type StatementPattern not supported for cost estimation. If you run into this, please report a bug.
at com.fluidops.fedx.FedXConnection.evaluateInternal(FedXConnection.java:336)
at org.eclipse.rdf4j.sail.helpers.AbstractSailConnection.evaluate(AbstractSailConnection.java:267)
at org.eclipse.rdf4j.repository.sail.SailTupleQuery.evaluate(SailTupleQuery.java:54)
... 3 more
Caused by: com.fluidops.fedx.exception.FedXRuntimeException: Type StatementPattern not supported for cost estimation. If you run into this, please report a bug.
at com.fluidops.fedx.optimizer.OptimizerUtil.getFreeVars(OptimizerUtil.java:105)
at org.aksw.simba.quetsal.core.JoinOrderOptimizer.optimizeJoinOrder(JoinOrderOptimizer.java:157)
at com.fluidops.fedx.optimizer.StatementGroupOptimizer.meetNJoin(StatementGroupOptimizer.java:172)
at com.fluidops.fedx.optimizer.StatementGroupOptimizer.meetOther(StatementGroupOptimizer.java:78)
at com.fluidops.fedx.algebra.NJoin.visit(NJoin.java:51)
at com.fluidops.fedx.algebra.NTuple.visitChildren(NTuple.java:74)
at org.eclipse.rdf4j.query.algebra.helpers.AbstractQueryModelVisitor.meetNode(AbstractQueryModelVisitor.java:661)
at org.eclipse.rdf4j.query.algebra.helpers.AbstractQueryModelVisitor.meetOther(AbstractQueryModelVisitor.java:593)
at com.fluidops.fedx.optimizer.StatementGroupOptimizer.meetOther(StatementGroupOptimizer.java:80)
at com.fluidops.fedx.algebra.NUnion.visit(NUnion.java:50)
at org.eclipse.rdf4j.query.algebra.UnaryTupleOperator.visitChildren(UnaryTupleOperator.java:81)
at org.eclipse.rdf4j.query.algebra.Projection.visitChildren(Projection.java:84)
at org.eclipse.rdf4j.query.algebra.helpers.AbstractQueryModelVisitor.meetNode(AbstractQueryModelVisitor.java:661)
at org.eclipse.rdf4j.query.algebra.helpers.AbstractQueryModelVisitor.meetUnaryTupleOperator(AbstractQueryModelVisitor.java:687)
at org.eclipse.rdf4j.query.algebra.helpers.AbstractQueryModelVisitor.meet(AbstractQueryModelVisitor.java:457)
at org.eclipse.rdf4j.query.algebra.Projection.visit(Projection.java:76)
at org.eclipse.rdf4j.query.algebra.UnaryTupleOperator.visitChildren(UnaryTupleOperator.java:81)
at org.eclipse.rdf4j.query.algebra.helpers.AbstractQueryModelVisitor.meetNode(AbstractQueryModelVisitor.java:661)
at org.eclipse.rdf4j.query.algebra.helpers.AbstractQueryModelVisitor.meetUnaryTupleOperator(AbstractQueryModelVisitor.java:687)
at org.eclipse.rdf4j.query.algebra.helpers.AbstractQueryModelVisitor.meet(AbstractQueryModelVisitor.java:223)
at org.eclipse.rdf4j.query.algebra.Distinct.visit(Distinct.java:30)
at org.eclipse.rdf4j.query.algebra.UnaryTupleOperator.visitChildren(UnaryTupleOperator.java:81)
at org.eclipse.rdf4j.query.algebra.helpers.AbstractQueryModelVisitor.meetNode(AbstractQueryModelVisitor.java:661)
at org.eclipse.rdf4j.query.algebra.helpers.AbstractQueryModelVisitor.meetUnaryTupleOperator(AbstractQueryModelVisitor.java:687)
at org.eclipse.rdf4j.query.algebra.helpers.AbstractQueryModelVisitor.meet(AbstractQueryModelVisitor.java:517)
at org.eclipse.rdf4j.query.algebra.Slice.visit(Slice.java:86)
at org.eclipse.rdf4j.query.algebra.UnaryTupleOperator.visitChildren(UnaryTupleOperator.java:81)
at org.eclipse.rdf4j.query.algebra.helpers.AbstractQueryModelVisitor.meetNode(AbstractQueryModelVisitor.java:661)
at org.eclipse.rdf4j.query.algebra.helpers.AbstractQueryModelVisitor.meet(AbstractQueryModelVisitor.java:475)
at org.eclipse.rdf4j.query.algebra.QueryRoot.visit(QueryRoot.java:47)
at com.fluidops.fedx.optimizer.StatementGroupOptimizer.optimize(StatementGroupOptimizer.java:65)
at com.fluidops.fedx.optimizer.Optimizer.optimize(Optimizer.java:153)
at com.fluidops.fedx.FedXConnection.evaluateInternal(FedXConnection.java:333)
... 5 more
An example of the query 7
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rev: <http://purl.org/stuff/rev#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX bsbm: <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/vocabulary/>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
SELECT DISTINCT ?productLabel ?offer ?price ?vendor ?vendorTitle ?review ?revTitle ?reviewer ?revName ?rating1 ?rating2 WHERE {
?localProduct rdf:type bsbm:Product .
# const bsbm:Product104891
?localProduct owl:sameAs bsbm:Product104891 .
?localProduct rdfs:label ?productLabel .
OPTIONAL {
?offer bsbm:product ?offerProduct .
?offerProduct owl:sameAs bsbm:Product104891 .
?offer bsbm:price ?price .
?offer bsbm:vendor ?vendor .
?vendor rdfs:label ?vendorTitle .
?vendor bsbm:country <http://downlode.org/rdf/iso-3166/countries#FR> .
?offer bsbm:validTo ?date .
# const "2008-03-26T00:00:00"^^xsd:dateTime < ?date
FILTER (?date > "2008-03-26T00:00:00"^^xsd:dateTime )
}
OPTIONAL {
?review bsbm:reviewFor ?reviewProduct .
?reviewProduct owl:sameAs bsbm:Product104891 .
?review rev:reviewer ?reviewer .
?reviewer foaf:name ?revName .
?review dc:title ?revTitle .
OPTIONAL { ?review bsbm:rating1 ?rating1 . }
OPTIONAL { ?review bsbm:rating2 ?rating2 . }
}
}
This query give the following stack trace
Exception in thread "Evaluation Scheduler_4" org.eclipse.rdf4j.query.QueryEvaluationException: @ sparql_localhost:34201_sparql?default-graph-uri=www.ratingsite7.fr_ - HTTP Error: 406 Not Acceptable. Subquery: ASK {<http://www.ratingsite5.fr/Product104891> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/vocabulary/Product> . }
at org.eclipse.rdf4j.repository.sparql.query.SPARQLBooleanQuery.evaluate(SPARQLBooleanQuery.java:45)
at com.fluidops.fedx.evaluation.SparqlTripleSource.hasStatements(SparqlTripleSource.java:160)
at com.fluidops.fedx.algebra.StatementSourcePattern.handleStatementSourcePatternCheck(StatementSourcePattern.java:122)
at com.fluidops.fedx.algebra.StatementSourcePattern.evaluate(StatementSourcePattern.java:91)
at com.fluidops.fedx.algebra.StatementSourcePattern.evaluate(StatementSourcePattern.java:61)
at com.fluidops.fedx.evaluation.FederationEvalStrategy$EvalVisitor.meet(FederationEvalStrategy.java:160)
at com.fluidops.fedx.algebra.StatementSourcePattern.visit(StatementSourcePattern.java:131)
at com.fluidops.fedx.evaluation.FederationEvalStrategy.evaluate(FederationEvalStrategy.java:211)
at org.aksw.simba.quetsal.core.TBSSFederationEvalStrategy.evaluate(TBSSFederationEvalStrategy.java:46)
at org.aksw.simba.quetsal.core.TBSSFederationEvalStrategy.evaluate(TBSSFederationEvalStrategy.java:54)
at org.aksw.simba.quetsal.core.TBSSFederationEvalStrategy$AsyncEval.call(TBSSFederationEvalStrategy.java:120)
at org.aksw.simba.quetsal.core.TBSSFederationEvalStrategy$AsyncEval.call(TBSSFederationEvalStrategy.java:98)
at com.fluidops.fedx.evaluation.concurrent.Async.run(Async.java:20)
at com.fluidops.fedx.evaluation.concurrent.ControlledWorkerScheduler.threadProc(ControlledWorkerScheduler.java:105)
at com.fluidops.fedx.evaluation.concurrent.ControlledWorkerScheduler.access$0(ControlledWorkerScheduler.java:58)
at com.fluidops.fedx.evaluation.concurrent.ControlledWorkerScheduler$1.run(ControlledWorkerScheduler.java:50)
at java.base/java.lang.Thread.run(Thread.java:833)
at com.fluidops.fedx.evaluation.iterator.QueueIterator.getNextElement(QueueIterator.java:41)
at com.fluidops.fedx.evaluation.iterator.RestartableLookAheadIteration.lookAhead(RestartableLookAheadIteration.java:50)
at com.fluidops.fedx.evaluation.iterator.RestartableLookAheadIteration.hasNext(RestartableLookAheadIteration.java:21)
at com.fluidops.fedx.evaluation.iterator.QueueIteration.getNextElement(QueueIteration.java:40)
at com.fluidops.fedx.evaluation.iterator.RestartableLookAheadIteration.lookAhead(RestartableLookAheadIteration.java:50)
at com.fluidops.fedx.evaluation.iterator.RestartableLookAheadIteration.hasNext(RestartableLookAheadIteration.java:21)
at org.aksw.simba.quetsal.core.evaluation.BindJoinImpl.getNextElement(BindJoinImpl.java:100)
at org.aksw.simba.quetsal.core.evaluation.BindJoinImpl.getNextElement(BindJoinImpl.java:26)
at com.fluidops.fedx.evaluation.iterator.RestartableLookAheadIteration.lookAhead(RestartableLookAheadIteration.java:50)
at com.fluidops.fedx.evaluation.iterator.RestartableLookAheadIteration.hasNext(RestartableLookAheadIteration.java:21)
at org.aksw.simba.quetsal.core.evaluation.BindJoinImpl.handleBindings(BindJoinImpl.java:84)
at org.aksw.simba.quetsal.core.evaluation.BindJoinImpl$AsyncBindingTask.callAsync(BindJoinImpl.java:136)
at org.aksw.simba.quetsal.core.evaluation.BindJoinImpl$AsyncBindingTask.callAsync(BindJoinImpl.java:122)
at com.fluidops.fedx.evaluation.concurrent.Async.run(Async.java:25)
at com.fluidops.fedx.evaluation.concurrent.ControlledWorkerScheduler.threadProc(ControlledWorkerScheduler.java:105)
at com.fluidops.fedx.evaluation.concurrent.ControlledWorkerScheduler.access$0(ControlledWorkerScheduler.java:58)
at com.fluidops.fedx.evaluation.concurrent.ControlledWorkerScheduler$1.run(ControlledWorkerScheduler.java:50)
at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: org.eclipse.rdf4j.repository.RepositoryException: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>406 Not Acceptable</title>
</head><body>
<h1>406 Not Acceptable</h1>
<p>An appropriate representation of the requested resource sparql could not be found on this server.</p>
Available variant(s):
<ul>
<li><a href="sparql">sparql</a> , type text/html, charset UTF-8</li>
</ul>
</body></html>
at org.eclipse.rdf4j.http.client.SPARQLProtocolSession.execute(SPARQLProtocolSession.java:1123)
at org.eclipse.rdf4j.http.client.SPARQLProtocolSession.executeOK(SPARQLProtocolSession.java:1046)
at org.eclipse.rdf4j.http.client.SPARQLProtocolSession.sendBooleanQueryViaHttp(SPARQLProtocolSession.java:1032)
at org.eclipse.rdf4j.http.client.SPARQLProtocolSession.getBoolean(SPARQLProtocolSession.java:978)
at org.eclipse.rdf4j.http.client.SPARQLProtocolSession.sendBooleanQuery(SPARQLProtocolSession.java:481)
at org.eclipse.rdf4j.repository.sparql.query.SPARQLBooleanQuery.evaluate(SPARQLBooleanQuery.java:38)
at com.fluidops.fedx.evaluation.SparqlTripleSource.hasStatements(SparqlTripleSource.java:160)
at com.fluidops.fedx.algebra.StatementSourcePattern.handleStatementSourcePatternCheck(StatementSourcePattern.java:122)
at com.fluidops.fedx.algebra.StatementSourcePattern.evaluate(StatementSourcePattern.java:91)
at com.fluidops.fedx.algebra.StatementSourcePattern.evaluate(StatementSourcePattern.java:61)
at com.fluidops.fedx.evaluation.FederationEvalStrategy$EvalVisitor.meet(FederationEvalStrategy.java:160)
at com.fluidops.fedx.algebra.StatementSourcePattern.visit(StatementSourcePattern.java:131)
at com.fluidops.fedx.evaluation.FederationEvalStrategy.evaluate(FederationEvalStrategy.java:211)
at org.aksw.simba.quetsal.core.TBSSFederationEvalStrategy.evaluate(TBSSFederationEvalStrategy.java:46)
at org.aksw.simba.quetsal.core.TBSSFederationEvalStrategy.evaluate(TBSSFederationEvalStrategy.java:54)
at org.aksw.simba.quetsal.core.TBSSFederationEvalStrategy$AsyncEval.call(TBSSFederationEvalStrategy.java:120)
at org.aksw.simba.quetsal.core.TBSSFederationEvalStrategy$AsyncEval.call(TBSSFederationEvalStrategy.java:98)
at com.fluidops.fedx.evaluation.concurrent.Async.run(Async.java:20)
... 4 more
An example of the query 11
PREFIX bsbm: <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/vocabulary/>
SELECT DISTINCT ?property ?hasValue ?isValueOf WHERE {
# const <http://www.vendor0.fr/Offer831>
<http://www.vendor0.fr/Offer831> bsbm:product ?product .
{ <http://www.vendor0.fr/Offer831> ?property ?hasValue }
UNION
{ ?isValueOf ?property <http://www.vendor0.fr/Offer831> }
}
This query give the following stack trace
org.eclipse.rdf4j.query.QueryEvaluationException: com.fluidops.fedx.exception.OptimizationException: com.fluidops.fedx.exception.OptimizationException: Error checking results for endpoint sparql_localhost:34201_sparql?default-graph-uri=www.ratingsite0.fr_: @ sparql_localhost:34201_sparql?default-graph-uri=www.ratingsite0.fr_ - HTTP Error: 406 Not Acceptable. Subquery: ASK {<http://www.vendor0.fr/Offer831> ?property ?hasValue . }
at org.eclipse.rdf4j.repository.sail.SailTupleQuery.evaluate(SailTupleQuery.java:64)
at org.aksw.simba.start.QueryEvaluation.evaluate(QueryEvaluation.java:168)
at org.aksw.simba.start.QueryEvaluation.multyEvaluate(QueryEvaluation.java:216)
at org.aksw.simba.start.QueryEvaluation.main(QueryEvaluation.java:123)
Caused by: org.eclipse.rdf4j.sail.SailException: com.fluidops.fedx.exception.OptimizationException: com.fluidops.fedx.exception.OptimizationException: Error checking results for endpoint sparql_localhost:34201_sparql?default-graph-uri=www.ratingsite0.fr_: @ sparql_localhost:34201_sparql?default-graph-uri=www.ratingsite0.fr_ - HTTP Error: 406 Not Acceptable. Subquery: ASK {<http://www.vendor0.fr/Offer831> ?property ?hasValue . }
at com.fluidops.fedx.FedXConnection.evaluateInternal(FedXConnection.java:336)
at org.eclipse.rdf4j.sail.helpers.AbstractSailConnection.evaluate(AbstractSailConnection.java:267)
at org.eclipse.rdf4j.repository.sail.SailTupleQuery.evaluate(SailTupleQuery.java:54)
... 3 more
Caused by: com.fluidops.fedx.exception.OptimizationException: com.fluidops.fedx.exception.OptimizationException: Error checking results for endpoint sparql_localhost:34201_sparql?default-graph-uri=www.ratingsite0.fr_: @ sparql_localhost:34201_sparql?default-graph-uri=www.ratingsite0.fr_ - HTTP Error: 406 Not Acceptable. Subquery: ASK {<http://www.vendor0.fr/Offer831> ?property ?hasValue . }
at org.aksw.simba.quetsal.core.TBSSSourceSelection$SourceSelectionExecutorWithLatch.executeRemoteSourceSelection(TBSSSourceSelection.java:1437)
at org.aksw.simba.quetsal.core.TBSSSourceSelection$SourceSelectionExecutorWithLatch.run(TBSSSourceSelection.java:1387)
at org.aksw.simba.quetsal.core.TBSSSourceSelection.performSourceSelection(TBSSSourceSelection.java:207)
at com.fluidops.fedx.optimizer.Optimizer.optimize(Optimizer.java:87)
at com.fluidops.fedx.FedXConnection.evaluateInternal(FedXConnection.java:333)
... 5 more
Caused by: java.util.concurrent.ExecutionException: com.fluidops.fedx.exception.OptimizationException: Error checking results for endpoint sparql_localhost:34201_sparql?default-graph-uri=www.ratingsite0.fr_: @ sparql_localhost:34201_sparql?default-graph-uri=www.ratingsite0.fr_ - HTTP Error: 406 Not Acceptable. Subquery: ASK {<http://www.vendor0.fr/Offer831> ?property ?hasValue . }
at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
at org.aksw.simba.quetsal.core.TBSSSourceSelection$SourceSelectionExecutorWithLatch.executeRemoteSourceSelection(TBSSSourceSelection.java:1417)
... 9 more
Caused by: com.fluidops.fedx.exception.OptimizationException: Error checking results for endpoint sparql_localhost:34201_sparql?default-graph-uri=www.ratingsite0.fr_: @ sparql_localhost:34201_sparql?default-graph-uri=www.ratingsite0.fr_ - HTTP Error: 406 Not Acceptable. Subquery: ASK {<http://www.vendor0.fr/Offer831> ?property ?hasValue . }
at org.aksw.simba.quetsal.core.TBSSSourceSelection$ParallelCheckTask.call(TBSSSourceSelection.java:1487)
at org.aksw.simba.quetsal.core.TBSSSourceSelection$ParallelCheckTask.call(TBSSSourceSelection.java:1458)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at com.fluidops.fedx.evaluation.concurrent.ControlledWorkerScheduler$WorkerTask.run(ControlledWorkerScheduler.java:237)
at com.fluidops.fedx.evaluation.concurrent.ControlledWorkerScheduler.threadProc(ControlledWorkerScheduler.java:105)
at com.fluidops.fedx.evaluation.concurrent.ControlledWorkerScheduler.access$0(ControlledWorkerScheduler.java:58)
at com.fluidops.fedx.evaluation.concurrent.ControlledWorkerScheduler$1.run(ControlledWorkerScheduler.java:50)
at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: org.eclipse.rdf4j.query.QueryEvaluationException: @ sparql_localhost:34201_sparql?default-graph-uri=www.ratingsite0.fr_ - HTTP Error: 406 Not Acceptable. Subquery: ASK {<http://www.vendor0.fr/Offer831> ?property ?hasValue . }
at org.eclipse.rdf4j.repository.sparql.query.SPARQLBooleanQuery.evaluate(SPARQLBooleanQuery.java:45)
at com.fluidops.fedx.evaluation.SparqlTripleSource.hasStatements(SparqlTripleSource.java:160)
at org.aksw.simba.quetsal.core.TBSSSourceSelection$ParallelCheckTask.call(TBSSSourceSelection.java:1477)
... 7 more
Caused by: org.eclipse.rdf4j.repository.RepositoryException: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>406 Not Acceptable</title>
</head><body>
<h1>406 Not Acceptable</h1>
<p>An appropriate representation of the requested resource sparql could not be found on this server.</p>
Available variant(s):
<ul>
<li><a href="sparql">sparql</a> , type text/html, charset UTF-8</li>
</ul>
</body></html>
at org.eclipse.rdf4j.http.client.SPARQLProtocolSession.execute(SPARQLProtocolSession.java:1123)
at org.eclipse.rdf4j.http.client.SPARQLProtocolSession.executeOK(SPARQLProtocolSession.java:1046)
at org.eclipse.rdf4j.http.client.SPARQLProtocolSession.sendBooleanQueryViaHttp(SPARQLProtocolSession.java:1032)
at org.eclipse.rdf4j.http.client.SPARQLProtocolSession.getBoolean(SPARQLProtocolSession.java:978)
at org.eclipse.rdf4j.http.client.SPARQLProtocolSession.sendBooleanQuery(SPARQLProtocolSession.java:481)
at org.eclipse.rdf4j.repository.sparql.query.SPARQLBooleanQuery.evaluate(SPARQLBooleanQuery.java:38)
... 9 more
An example of the query 12
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rev: <http://purl.org/stuff/rev#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX bsbm: <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/vocabulary/>
PREFIX bsbm-export: <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/vocabulary/export/>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
SELECT DISTINCT * WHERE {
# const <http://www.vendor8.fr/Offer1054>
<http://www.vendor8.fr/Offer1054> bsbm:product ?productURI .
?productURI owl:sameAs ?ProductXYZ .
?productURI rdfs:label ?productlabel .
<http://www.vendor8.fr/Offer1054> bsbm:vendor ?vendorURI .
?vendorURI rdfs:label ?vendorname .
?vendorURI foaf:homepage ?vendorhomepage .
<http://www.vendor8.fr/Offer1054> bsbm:offerWebpage ?offerURL .
<http://www.vendor8.fr/Offer1054> bsbm:price ?price .
<http://www.vendor8.fr/Offer1054> bsbm:deliveryDays ?deliveryDays .
<http://www.vendor8.fr/Offer1054> bsbm:validTo ?validTo
}
This query give the following stack trace
org.eclipse.rdf4j.query.QueryEvaluationException: java.lang.RuntimeException: internal error: subject is not null
at org.eclipse.rdf4j.repository.sail.SailTupleQuery.evaluate(SailTupleQuery.java:64)
at org.aksw.simba.start.QueryEvaluation.evaluate(QueryEvaluation.java:168)
at org.aksw.simba.start.QueryEvaluation.multyEvaluate(QueryEvaluation.java:216)
at org.aksw.simba.start.QueryEvaluation.main(QueryEvaluation.java:123)
Caused by: org.eclipse.rdf4j.sail.SailException: java.lang.RuntimeException: internal error: subject is not null
at com.fluidops.fedx.FedXConnection.evaluateInternal(FedXConnection.java:336)
at org.eclipse.rdf4j.sail.helpers.AbstractSailConnection.evaluate(AbstractSailConnection.java:267)
at org.eclipse.rdf4j.repository.sail.SailTupleQuery.evaluate(SailTupleQuery.java:54)
... 3 more
Caused by: java.lang.RuntimeException: internal error: subject is not null
at org.aksw.simba.quetsal.configuration.CostFedSummary.lookupSbjPrefixes(CostFedSummary.java:578)
at org.aksw.simba.quetsal.core.TBSSSourceSelection.getFedSumDMatchingSbjAuthorities(TBSSSourceSelection.java:1057)
at org.aksw.simba.quetsal.core.TBSSSourceSelection.lambda$pruneSources$3(TBSSSourceSelection.java:734)
at org.aksw.simba.quetsal.core.TBSSSourceSelection.handleEdge(TBSSSourceSelection.java:605)
at org.aksw.simba.quetsal.core.TBSSSourceSelection.handleStatement(TBSSSourceSelection.java:620)
at org.aksw.simba.quetsal.core.TBSSSourceSelection.pruneSources(TBSSSourceSelection.java:734)
at org.aksw.simba.quetsal.core.TBSSSourceSelection.performSourceSelection(TBSSSourceSelection.java:233)
at com.fluidops.fedx.optimizer.Optimizer.optimize(Optimizer.java:87)
at com.fluidops.fedx.FedXConnection.evaluateInternal(FedXConnection.java:333)
... 5 more
By disable ASK Queries, queries 2, 7, 11 and 12 work
We need to split the query 4 into 2 differents queries and don't forget to injected the label value in each of these queries!
Instead of split query 4, remove 2 exception solve this problem. Indeed, the first exception we need to remove, by just returning the freeVars at the end of the method getFreeVars RSFB/engines/CostFed/fedx/src/main/java/com/fluidops/fedx/optimizer/OptimizerUtil.java
solve the parsing problem of the query 4. To fix the execution problem of the query 4, we need to remove the exception in the getStatements method in RSFB/engines/CostFed/fedx/src/main/java/com/fluidops/fedx/evaluation/FederationEvalStrategy.java
and return an emptyIteration instead, who have the same behavior.
Step 1
With the following query
Test on endpoint http://www.ratingsite0.fr/ and http://www.vendor0.fr/
Give the following result (with Virtuoso and CostFed)