Class TripleRefJoinOptimizer

All Implemented Interfaces:
FedXOptimizer, QueryModelVisitor<OptimizationException>

public class TripleRefJoinOptimizer extends AbstractSimpleQueryModelVisitor<OptimizationException> implements FedXOptimizer
Optimizer that groups TripleRefStatementPattern nodes with co-located StatementPattern nodes into TripleRefJoinGroup instances, enabling efficient federated evaluation of RDF 1.2 reification patterns.

The optimizer visits every NJoin in the query tree (depth-first) and looks for pairs of a TripleRefStatementPattern and one or more plain StatementPatterns that share the same unbound subject variable. Matched patterns are collapsed into a single TripleRefJoinGroup that can be sent as one request to the owning endpoints.

Author:
Andreas Schwarte
See Also: