Invalid order detected

I had a mapping that was previously working then made an update to test something but after restoring the mapping back after the test the previously working mapping now throws the following error.

ERROR 2020-07-06 14:32:06,235 [stardog-user-21] com.complexible.stardog.QueryManager:exceptionTriggered(498): Error during execution of the query
select distinct ?graph where { graph ?graph { } } limit 1000
with query plan 
prefix : <http://api.stardog.com/>
prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix xsd: <http://www.w3.org/2001/XMLSchema#>
prefix owl: <http://www.w3.org/2002/07/owl#>
prefix stardog: <tag:stardog:api:>

From local
Slice(offset=0, limit=1000) [#2]
`─ Distinct [#2]
   `─ Projection(?graph) [#2]
      `─ Distinct [#2]
         `─ Union [#2]
            +─ Bind(<virtual://geolite2> AS ?graph) [#1]
            `─ Scan[C](_, _, _){?graph} [#1]

against database geolite2
java.lang.IllegalArgumentException: Invalid argument order detected, this is a bug in the query optimizer
	at com.google.common.base.Preconditions.checkArgument(Preconditions.java:141) ~[guava-27.0-jre.jar:?]
	at com.complexible.stardog.plan.eval.operator.impl.LazySingleSortedGroupify$1.next(GroupifyAlgorithms.java:480) ~[stardog-7.3.2.jar:?]
	at com.complexible.stardog.plan.eval.operator.impl.LazySingleSortedGroupify$1.computeNext(GroupifyAlgorithms.java:490) ~[stardog-7.3.2.jar:?]
	at com.complexible.stardog.plan.eval.operator.impl.LazySingleSortedGroupify$1.computeNext(GroupifyAlgorithms.java:472) ~[stardog-7.3.2.jar:?]
	at com.complexible.common.collect.AbstractSkippingIterator.tryToComputeNext(AbstractSkippingIterator.java:147) ~[stardog-utils-common-7.3.2.jar:?]
	at com.complexible.common.collect.AbstractSkippingIterator.hasNext(AbstractSkippingIterator.java:134) ~[stardog-utils-common-7.3.2.jar:?]
	at com.complexible.stardog.plan.eval.operator.impl.AbstractGroupOp.computeNext(AbstractGroupOp.java:166) ~[stardog-7.3.2.jar:?]
	at com.complexible.stardog.plan.eval.operator.impl.AbstractGroupOp.computeNext(AbstractGroupOp.java:32) ~[stardog-7.3.2.jar:?]
	at com.complexible.common.collect.AbstractSkippingIterator.tryToComputeNext(AbstractSkippingIterator.java:147) ~[stardog-utils-common-7.3.2.jar:?]
	at com.complexible.common.collect.AbstractSkippingIterator.hasNext(AbstractSkippingIterator.java:134) ~[stardog-utils-common-7.3.2.jar:?]
	at com.complexible.stardog.plan.eval.operator.impl.DistinctOp.computeNext(DistinctOp.java:58) ~[stardog-7.3.2.jar:?]
	at com.complexible.stardog.plan.eval.operator.impl.DistinctOp.computeNext(DistinctOp.java:21) ~[stardog-7.3.2.jar:?]
	at com.complexible.common.collect.AbstractSkippingIterator.tryToComputeNext(AbstractSkippingIterator.java:147) ~[stardog-utils-common-7.3.2.jar:?]
	at com.complexible.common.collect.AbstractSkippingIterator.hasNext(AbstractSkippingIterator.java:134) ~[stardog-utils-common-7.3.2.jar:?]
	at com.complexible.stardog.plan.eval.operator.impl.SliceOp._hasNext(SliceOp.java:92) ~[stardog-7.3.2.jar:?]
	at com.complexible.stardog.plan.eval.operator.impl.SliceOp.computeNext(SliceOp.java:100) ~[stardog-7.3.2.jar:?]
	at com.complexible.stardog.plan.eval.operator.impl.SliceOp.computeNext(SliceOp.java:26) ~[stardog-7.3.2.jar:?]
	at com.complexible.common.collect.AbstractSkippingIterator.tryToComputeNext(AbstractSkippingIterator.java:147) ~[stardog-utils-common-7.3.2.jar:?]
	at com.complexible.common.collect.AbstractSkippingIterator.hasNext(AbstractSkippingIterator.java:134) ~[stardog-utils-common-7.3.2.jar:?]
	at com.complexible.stardog.plan.eval.operator.util.AutoCloseOperator.computeNext(AutoCloseOperator.java:154) ~[stardog-7.3.2.jar:?]
	at com.complexible.stardog.plan.eval.operator.util.AutoCloseOperator.computeNext(AutoCloseOperator.java:28) ~[stardog-7.3.2.jar:?]
	at com.complexible.common.collect.AbstractSkippingIterator.tryToComputeNext(AbstractSkippingIterator.java:147) ~[stardog-utils-common-7.3.2.jar:?]
	at com.complexible.common.collect.AbstractSkippingIterator.hasNext(AbstractSkippingIterator.java:134) ~[stardog-utils-common-7.3.2.jar:?]
	at com.complexible.stardog.plan.eval.operator.util.OpBasedBindingSetIteration.computeNext(OpBasedBindingSetIteration.java:119) ~[stardog-7.3.2.jar:?]
	at com.complexible.stardog.plan.eval.operator.util.OpBasedBindingSetIteration.computeNext(OpBasedBindingSetIteration.java:40) ~[stardog-7.3.2.jar:?]
	at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:141) ~[guava-27.0-jre.jar:?]
	at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:136) ~[guava-27.0-jre.jar:?]
	at com.complexible.common.base.CloseableIterator$2.computeNext(CloseableIterator.java:84) ~[stardog-utils-common-7.3.2.jar:?]
	at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:141) ~[guava-27.0-jre.jar:?]
	at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:136) ~[guava-27.0-jre.jar:?]
	at com.complexible.common.rdf.query.IteratorAsTupleQueryResult.computeNext(IteratorAsTupleQueryResult.java:81) ~[stardog-utils-rdf-7.3.2.jar:?]
	at com.complexible.common.rdf.query.IteratorAsTupleQueryResult.computeNext(IteratorAsTupleQueryResult.java:23) ~[stardog-utils-rdf-7.3.2.jar:?]
	at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:141) ~[guava-27.0-jre.jar:?]
	at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:136) ~[guava-27.0-jre.jar:?]
	at com.stardog.stark.query.ClosingSpliterator.forEachRemaining(ClosingSpliterator.java:37) ~[stardog-stark-query-api-7.3.2.jar:?]
	at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:647) ~[?:1.8.0_252]
	at com.stardog.stark.query.io.QueryResultWriters.write(QueryResultWriters.java:142) ~[stardog-stark-query-io-7.3.2.jar:?]
	at com.stardog.stark.query.io.QueryResultWriters.write(QueryResultWriters.java:127) ~[stardog-stark-query-io-7.3.2.jar:?]
	at com.complexible.stardog.protocols.http.server.ProtocolUtils.writeTupleResponse(ProtocolUtils.java:697) ~[stardog-protocols-http-server-7.3.2.jar:?]
	at com.complexible.stardog.protocols.http.server.ProtocolUtils.executeReadQuery(ProtocolUtils.java:589) ~[stardog-protocols-http-server-7.3.2.jar:?]
	at com.complexible.stardog.protocols.http.server.ProtocolUtils.executeReadQuery(ProtocolUtils.java:561) ~[stardog-protocols-http-server-7.3.2.jar:?]
	at com.complexible.stardog.protocols.http.server.ProtocolUtils.executeReadQuery(ProtocolUtils.java:522) ~[stardog-protocols-http-server-7.3.2.jar:?]
	at com.complexible.stardog.protocols.http.server.SPARQLProtocol.executeQuery(SPARQLProtocol.java:146) ~[stardog-protocols-http-server-7.3.2.jar:?]
	at com.complexible.stardog.protocols.http.server.SPARQLProtocol.post(SPARQLProtocol.java:106) ~[stardog-protocols-http-server-7.3.2.jar:?]
	at com.stardog.http.server.undertow.jaxrs.ExtractRoutes.lambda$handleIt$5(ExtractRoutes.java:192) ~[stardog-protocols-http-server-7.3.2.jar:?]
	at org.apache.shiro.subject.support.SubjectRunnable.doRun(SubjectRunnable.java:120) [shiro-core-1.3.0.jar:1.3.0]
	at org.apache.shiro.subject.support.SubjectRunnable.run(SubjectRunnable.java:108) [shiro-core-1.3.0.jar:1.3.0]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_252]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_252]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_252]

I'm querying from Studio so I'm guessing that might be where the limit=1000 is coming from.

  • Stardog version 7.3.2
  • Virtual transperency enabled
  • The problem persists after a Stardog restart.
  • I'm attaching the virtual graph to a database that is dropped and recreated when I reload the mapping.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.