Class HashJoin
java.lang.Object
org.eclipse.rdf4j.common.iteration.AbstractCloseableIteration<BindingSet>
org.eclipse.rdf4j.common.iteration.LookAheadIteration<BindingSet>
org.eclipse.rdf4j.federated.evaluation.concurrent.ParallelExecutorBase<BindingSet>
org.eclipse.rdf4j.federated.evaluation.join.JoinExecutorBase<BindingSet>
org.eclipse.rdf4j.federated.evaluation.join.HashJoin
- All Implemented Interfaces:
 AutoCloseable, Runnable, Iterator<BindingSet>, CloseableIteration<BindingSet>, ParallelExecutor<BindingSet>
Operator for a hash join of tuple expressions.
- Since:
 - 6.0
 - Author:
 - Andreas Schwarte
 
- 
Field Summary
Fields inherited from class JoinExecutorBase
bindings, joinVars, leftIter, rightArgFields inherited from class ParallelExecutorBase
evaluationThread, executorId, finished, log, NEXT_EXECUTOR_ID, queryInfo, rightIter, rightQueue, strategyFields inherited from interface CloseableIteration
EMPTY_STATEMENT_ITERATION - 
Constructor Summary
ConstructorsConstructorDescriptionHashJoin(FederationEvalStrategy strategy, CloseableIteration<BindingSet> leftIter, TupleExpr rightArg, QueryEvaluationStep rightPrepared, Set<String> joinVars, BindingSet bindings, QueryInfo queryInfo)  - 
Method Summary
Modifier and TypeMethodDescriptionprotected voidImplementations must implement this method to handle bindings.protected voidperformJoin(Collection<BindingSet> leftBlock, Collection<BindingSet> rightBlock, Set<String> joinVariables, Collection<String> freeVariablesRight) Perform the join and add the result to this cursor.Methods inherited from class JoinExecutorBase
getExecutorType, getJoinVars, handleClose, performExecution, setJoinVarsMethods inherited from class ParallelExecutorBase
addResult, checkTimeout, done, getDisplayId, getId, getNextElement, getQueryInfo, isFinished, run, toss, toStringMethods inherited from class LookAheadIteration
hasNext, next, removeMethods inherited from class AbstractCloseableIteration
close, isClosedMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface CloseableIteration
streamMethods inherited from interface Iterator
forEachRemaining 
- 
Constructor Details
- 
HashJoin
public HashJoin(FederationEvalStrategy strategy, CloseableIteration<BindingSet> leftIter, TupleExpr rightArg, QueryEvaluationStep rightPrepared, Set<String> joinVars, BindingSet bindings, QueryInfo queryInfo) throws QueryEvaluationException - Throws:
 QueryEvaluationException
 
 - 
 - 
Method Details
- 
handleBindings
Description copied from class:JoinExecutorBaseImplementations must implement this method to handle bindings. Use the following as a templatewhile (!closed invalid input: '&'invalid input: '&' leftIter.hasNext()) { // your code }and add results to rightQueue. Note that addResult() is implemented synchronized and thus thread safe. In case you can guarantee sequential access, it is also possible to directly access rightQueue Note that the implementation must block until the entire join is executed.- Specified by:
 handleBindingsin classJoinExecutorBase<BindingSet>- Throws:
 Exception
 - 
performJoin
protected void performJoin(Collection<BindingSet> leftBlock, Collection<BindingSet> rightBlock, Set<String> joinVariables, Collection<String> freeVariablesRight) Perform the join and add the result to this cursor.See
join(Collection, Collection, Set, Collection)andParallelExecutorBase.addResult(CloseableIteration).- Parameters:
 leftBlock-rightBlock-joinVariables-freeVariablesRight-
 
 -