So I know Jena Arq supports stage reordering as an optimization. (See https://github.com/apache/jena/blob/master/jena-arq/src/main/java/org/apache/jena/sparql/engine/main/StageGeneratorGeneric.java)
On line #70, there is a check for if the input is QueryIterRoot
-- My issue is every query I submit, the input is QueryIterRoot
so it never runs the optimization within that block.
Tracing back the stack, I can't see how to generate a query where QueryIterRoot isn't the input passed to StageGeneratorGeneric. Am I missing something to get stage optimization working?