Class ExecOpNaiveNestedLoopsJoin
java.lang.Object
se.liu.ida.hefquin.engine.queryplan.executable.impl.ops.BaseForExecOps
se.liu.ida.hefquin.engine.queryplan.executable.impl.ops.BinaryExecutableOpBase
se.liu.ida.hefquin.engine.queryplan.executable.impl.ops.ExecOpNaiveNestedLoopsJoin
- All Implemented Interfaces:
 StatsProvider,BinaryExecutableOp,ExecutableOperator
Attention, this is a purely local implementation of the nested loops
 join algorithm---nothing fancy, no requests to federation members or
 anything. Instead, this algorithm first consumes the whole first input
 and materializes it into a list. Thereafter, it performs a local nested
 loops join in which the outer loop iterates over the second input and
 the inner loop (repeatedly) iterates over the list with the first input.
 It is certainly better to use the 
ExecOpHashJoin instead. Instead 
 of simply putting all left-input solution mappings into a list, the hash
 join puts them into a hash index which can than be probed into for each
  right-input solution mapping.- 
Field Summary
FieldsFields inherited from class se.liu.ida.hefquin.engine.queryplan.executable.impl.ops.BinaryExecutableOpBase
timeAtCurrentLeftProcStart, timeAtCurrentRightProcStartFields inherited from class se.liu.ida.hefquin.engine.queryplan.executable.impl.ops.BaseForExecOps
collectExceptions - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionprotected void_processInputFromChild1(SolutionMapping inputSolMap, IntermediateResultElementSink sink, ExecutionContext execCxt) Implementations of this function need to process the given solution mapping as input coming from the first operand and send the produced result elements (if any) to the given sink.protected void_processInputFromChild2(List<SolutionMapping> inputSolMaps, IntermediateResultElementSink sink, ExecutionContext execCxt) Processes the input solution mappings of the given list by callingBinaryExecutableOpBase._processInputFromChild2(SolutionMapping, IntermediateResultElementSink, ExecutionContext)for each of them.protected void_processInputFromChild2(SolutionMapping inputSolMap, IntermediateResultElementSink sink, ExecutionContext execCxt) Implementations of this function need to process the given solution mapping as input coming from the second operand and send the produced result elements (if any) to the given sink.protected void_wrapUpForChild1(IntermediateResultElementSink sink, ExecutionContext execCxt) Implementations of this function need to finish up any processing related to the input coming from the first operand and send the remaining result elements (if any) to the given sink.protected void_wrapUpForChild2(IntermediateResultElementSink sink, ExecutionContext execCxt) Implementations of this function need to finish up any processing related to the input coming from the second operand and send the remaining result elements (if any) to the given sink.booleanReturns true if this operator is implemented based on the assumption that the COMPLETE input from the first operand has been sent to it before input from the second operand is sent.Methods inherited from class se.liu.ida.hefquin.engine.queryplan.executable.impl.ops.BinaryExecutableOpBase
_processInputFromChild1, createStats, getStats, processInputFromChild1, processInputFromChild1, processInputFromChild2, processInputFromChild2, resetStats, wrapUpForChild1, wrapUpForChild2Methods inherited from class se.liu.ida.hefquin.engine.queryplan.executable.impl.ops.BaseForExecOps
getExceptionsCaughtDuringExecution, recordExceptionCaughtDuringExecutionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface se.liu.ida.hefquin.engine.queryplan.executable.ExecutableOperator
getExceptionsCaughtDuringExecution 
- 
Field Details
- 
inputLHS
 
 - 
 - 
Constructor Details
- 
ExecOpNaiveNestedLoopsJoin
public ExecOpNaiveNestedLoopsJoin(boolean collectExceptions)  
 - 
 - 
Method Details
- 
requiresCompleteChild1InputFirst
public boolean requiresCompleteChild1InputFirst()Description copied from interface:BinaryExecutableOpReturns true if this operator is implemented based on the assumption that the COMPLETE input from the first operand has been sent to it before input from the second operand is sent. An example of an operator that may return true here is a hash join (which first needs to add all result elements from the first operand into its hash table and, then, can start consuming the result elements from the second operand by probing into the hash table). In contrast, a symmetric hash join (which has two hash tables and can consume result elements from both inputs in any order) would return false. Operators that return true here may throw anIllegalStateExceptionif their methodsorinvalid reference
#processBlockFromChild2(IntermediateResultBlock, IntermediateResultElementSink, ExecutionContext)BinaryExecutableOp.wrapUpForChild2(IntermediateResultElementSink, ExecutionContext)are called beforeBinaryExecutableOp.wrapUpForChild1(IntermediateResultElementSink, ExecutionContext)has been called. - 
_processInputFromChild1
protected void _processInputFromChild1(SolutionMapping inputSolMap, IntermediateResultElementSink sink, ExecutionContext execCxt) Description copied from class:BinaryExecutableOpBaseImplementations of this function need to process the given solution mapping as input coming from the first operand and send the produced result elements (if any) to the given sink. If an exception occurs while processing the solution mapping, then this exception needs to be thrown.- Specified by:
 _processInputFromChild1in classBinaryExecutableOpBase
 - 
_wrapUpForChild1
Description copied from class:BinaryExecutableOpBaseImplementations of this function need to finish up any processing related to the input coming from the first operand and send the remaining result elements (if any) to the given sink. If an exception occurs during this process, then this exception needs to be thrown.- Specified by:
 _wrapUpForChild1in classBinaryExecutableOpBase
 - 
_processInputFromChild2
protected void _processInputFromChild2(SolutionMapping inputSolMap, IntermediateResultElementSink sink, ExecutionContext execCxt) Description copied from class:BinaryExecutableOpBaseImplementations of this function need to process the given solution mapping as input coming from the second operand and send the produced result elements (if any) to the given sink. If an exception occurs while processing the solution mapping, then this exception needs to be thrown. May throw anIllegalStateExceptionfor operators for whichBinaryExecutableOp.requiresCompleteChild1InputFirst()returns true andBinaryExecutableOpBase._wrapUpForChild1(IntermediateResultElementSink, ExecutionContext)has not been called yet.- Specified by:
 _processInputFromChild2in classBinaryExecutableOpBase
 - 
_processInputFromChild2
protected void _processInputFromChild2(List<SolutionMapping> inputSolMaps, IntermediateResultElementSink sink, ExecutionContext execCxt) Description copied from class:BinaryExecutableOpBaseProcesses the input solution mappings of the given list by callingBinaryExecutableOpBase._processInputFromChild2(SolutionMapping, IntermediateResultElementSink, ExecutionContext)for each of them. Subclasses may override this behavior to send a greater number of output solution mappings to the given sink at a time (which is useful to reduce the communication between threads in the push-based execution model). If an exception occurs within the overriding implementation, then this exception needs to be thrown.- Overrides:
 _processInputFromChild2in classBinaryExecutableOpBase
 - 
_wrapUpForChild2
Description copied from class:BinaryExecutableOpBaseImplementations of this function need to finish up any processing related to the input coming from the second operand and send the remaining result elements (if any) to the given sink. If an exception occurs during this process, then this exception needs to be thrown. May throw anIllegalStateExceptionfor operators for whichBinaryExecutableOp.requiresCompleteChild1InputFirst()returns true andBinaryExecutableOpBase._wrapUpForChild1(IntermediateResultElementSink, ExecutionContext)has not been called yet.- Specified by:
 _wrapUpForChild2in classBinaryExecutableOpBase
 
 -