Hi
I've created 2 databases (with query.all.graphs set to true) in 6.1.2. All queries were via Studio
In testing DB I created the data as follows
prefix alu: <http://some.testing/voc/olt/alu#>
prefix : <http://some.testing/voc/olt/alu/inst#>
insert data {
:thing1 alu:cardId "1" .
:thing2 alu:cardId "2" .
:thing3 alu:cardId "3" .
:thing4 alu:cardId "4" .
}
And in the other DB I created the data as follows
prefix alu: <http://some.testing.com/voc/olt/alu#>
prefix : <http://some.testing/voc/olt/alu/inst#>
insert data {
:thing1 alu:type "AACU-A" .
:thing2 alu:type "AACU-B" .
:thing3 alu:type "AACU-C" .
:thing4 alu:type "AACU-C" .
}
Then I ran the following query against the testing DB
prefix alu: <http://some.testing/voc/olt/alu#>
select * where {
service <db://other> {
select ?c where {
?c alu:type "AACU-C"
}
}
# ?c ?p ?o .
?c alu:cardId ?id .
}
I'm pretty sure it's valid SPARQL (online validators agree) but it gives the following error
Caused by: com.complexible.stardog.plan.eval.operator.OperatorException: Encountered " "where" "WHERE "" at line 11, column 1.
Was expecting one of:
"(" ...
"!" ...
"^" ...
"a" ...
<Q_IRI_REF> ...
<PNAME_NS> ...
<PNAME_LN> ...
<VAR1> ...
<VAR2> ...
at com.complexible.stardog.KernelDatabaseService$KernelDatabaseServiceQuery.evaluateBatch(KernelDatabaseService.java:130) ~[stardog-6.1.2.jar:?]
at com.complexible.stardog.plan.eval.service.BatchingJoinArgServiceQuery$BatchingJoinArgIterator.nextIterator(BatchingJoinArgServiceQuery.java:128) ~[stardog-6.1.2.jar:?]
at com.complexible.stardog.plan.eval.service.BatchingJoinArgServiceQuery$BatchingJoinArgIterator.computeNext(BatchingJoinArgServiceQuery.java:135) ~[stardog-6.1.2.jar:?]
at com.complexible.stardog.plan.eval.service.BatchingJoinArgServiceQuery$BatchingJoinArgIterator.computeNext(BatchingJoinArgServiceQuery.java:93) ~[stardog-6.1.2.jar:?]
at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:141) ~[guava-26.0-jre.jar:?]
at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:136) ~[guava-26.0-jre.jar:?]
at com.complexible.stardog.plan.eval.operator.impl.ServiceOperatorImpl.computeNext(ServiceOperatorImpl.java:89) ~[stardog-6.1.2.jar:?]
at com.complexible.stardog.plan.eval.operator.impl.ServiceOperatorImpl.computeNext(ServiceOperatorImpl.java:34) ~[stardog-6.1.2.jar:?]
at com.complexible.common.collect.AbstractSkippingIterator.tryToComputeNext(AbstractSkippingIterator.java:143) ~[stardog-utils-common-6.1.2.jar:?]
at com.complexible.common.collect.AbstractSkippingIterator.hasNext(AbstractSkippingIterator.java:130) ~[stardog-utils-common-6.1.2.jar:?]
at com.complexible.stardog.plan.eval.operator.impl.SingleProjectionOp.computeNext(SingleProjectionOp.java:82) ~[stardog-6.1.2.jar:?]
at com.complexible.stardog.plan.eval.operator.impl.SingleProjectionOp.computeNext(SingleProjectionOp.java:29) ~[stardog-6.1.2.jar:?]
at com.complexible.common.collect.AbstractSkippingIterator.tryToComputeNext(AbstractSkippingIterator.java:143) ~[stardog-utils-common-6.1.2.jar:?]
at com.complexible.common.collect.AbstractSkippingIterator.hasNext(AbstractSkippingIterator.java:130) ~[stardog-utils-common-6.1.2.jar:?]
at com.complexible.stardog.plan.eval.operator.util.AutoCloseOperator.computeNext(AutoCloseOperator.java:112) ~[stardog-6.1.2.jar:?]
at com.complexible.stardog.plan.eval.operator.util.AutoCloseOperator.computeNext(AutoCloseOperator.java:25) ~[stardog-6.1.2.jar:?]
at com.complexible.common.collect.AbstractSkippingIterator.tryToComputeNext(AbstractSkippingIterator.java:143) ~[stardog-utils-common-6.1.2.jar:?]
at com.complexible.common.collect.AbstractSkippingIterator.hasNext(AbstractSkippingIterator.java:130) ~[stardog-utils-common-6.1.2.jar:?]
at com.complexible.stardog.plan.eval.operator.util.OpBasedBindingSetIteration.computeNext(OpBasedBindingSetIteration.java:116) ~[stardog-6.1.2.jar:?]
at com.complexible.stardog.plan.eval.operator.util.OpBasedBindingSetIteration.computeNext(OpBasedBindingSetIteration.java:39) ~[stardog-6.1.2.jar:?]
at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:141) ~[guava-26.0-jre.jar:?]
at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:136) ~[guava-26.0-jre.jar:?]
at com.complexible.common.rdf.query.IteratorAsTupleQueryResult.hasNext(IteratorAsTupleQueryResult.java:78) ~[stardog-utils-rdf-6.1.2.jar:?]
... 15 more
Switching to the ?c ?p ?o pattern instead of the ?c alu:cardId ?id gave the same error with these 2 test DBs. Weirdly, in the 'real' DBs I was using for testing and originally saw the issue, it then worked OK and returned the expected results! (they had identical data - 489m quads). I was initially using the ?c ?p ?o pattern to see if it worked OK, and after it did, I wanted to then filter down the data to named properties