|
57 | 57 | import org.eclipse.rdf4j.federated.evaluation.join.ControlledWorkerBindJoin; |
58 | 58 | import org.eclipse.rdf4j.federated.evaluation.join.ControlledWorkerBoundJoin; |
59 | 59 | import org.eclipse.rdf4j.federated.evaluation.join.ControlledWorkerJoin; |
60 | | -import org.eclipse.rdf4j.federated.evaluation.join.ControlledWorkerLeftJoin; |
61 | 60 | import org.eclipse.rdf4j.federated.evaluation.join.SynchronousBoundJoin; |
62 | 61 | import org.eclipse.rdf4j.federated.evaluation.join.SynchronousJoin; |
63 | 62 | import org.eclipse.rdf4j.federated.evaluation.union.ControlledWorkerUnion; |
|
96 | 95 | import org.eclipse.rdf4j.query.QueryEvaluationException; |
97 | 96 | import org.eclipse.rdf4j.query.algebra.DescribeOperator; |
98 | 97 | import org.eclipse.rdf4j.query.algebra.Join; |
| 98 | +import org.eclipse.rdf4j.query.algebra.LeftJoin; |
99 | 99 | import org.eclipse.rdf4j.query.algebra.QueryRoot; |
100 | 100 | import org.eclipse.rdf4j.query.algebra.Service; |
101 | 101 | import org.eclipse.rdf4j.query.algebra.StatementPattern; |
@@ -745,10 +745,7 @@ public CloseableIteration<BindingSet> evaluate(BindingSet bindings) { |
745 | 745 |
|
746 | 746 | if (problemVars.containsAll(bindings.getBindingNames())) { |
747 | 747 | var leftIter = leftPrepared.evaluate(bindings); |
748 | | - ControlledWorkerLeftJoin join = new ControlledWorkerLeftJoin(scheduler, FederationEvalStrategy.this, |
749 | | - leftIter, leftJoin, bindings, leftJoin.getQueryInfo()); |
750 | | - executor.execute(join); |
751 | | - return join; |
| 748 | + return executeLeftJoin(scheduler, leftIter, leftJoin, bindings, leftJoin.getQueryInfo()); |
752 | 749 | } else { |
753 | 750 | Set<String> problemVarsClone = new HashSet<>(problemVars); |
754 | 751 | problemVarsClone.retainAll(bindings.getBindingNames()); |
@@ -839,6 +836,21 @@ protected abstract CloseableIteration<BindingSet> executeJoin( |
839 | 836 | CloseableIteration<BindingSet> leftIter, TupleExpr rightArg, |
840 | 837 | Set<String> joinVariables, BindingSet bindings, QueryInfo queryInfo) throws QueryEvaluationException; |
841 | 838 |
|
| 839 | + /** |
| 840 | + * Execute the left join in a separate thread using some join executor. |
| 841 | + * |
| 842 | + * @param joinScheduler |
| 843 | + * @param leftIter |
| 844 | + * @param leftJoin |
| 845 | + * @param bindings |
| 846 | + * @return the result |
| 847 | + * @throws QueryEvaluationException |
| 848 | + */ |
| 849 | + protected abstract CloseableIteration<BindingSet> executeLeftJoin( |
| 850 | + ControlledWorkerScheduler<BindingSet> joinScheduler, |
| 851 | + CloseableIteration<BindingSet> leftIter, LeftJoin leftJoin, |
| 852 | + BindingSet bindings, QueryInfo queryInfo) throws QueryEvaluationException; |
| 853 | + |
842 | 854 | public abstract CloseableIteration<BindingSet> evaluateExclusiveGroup( |
843 | 855 | ExclusiveGroup group, BindingSet bindings) |
844 | 856 | throws RepositoryException, MalformedQueryException, QueryEvaluationException; |
|
0 commit comments