Interface BinaryExecutableOp
- All Superinterfaces:
ExecutableOperator
,StatsProvider
- All Known Implementing Classes:
BinaryExecutableOpBase
,ExecOpBinaryUnion
,ExecOpHashJoin
,ExecOpHashRJoin
,ExecOpNaiveNestedLoopsJoin
,ExecOpSymmetricHashJoin
A specialization of the
ExecutableOperator
interface that
captures executable operators that consume a pair of two sequences
of solution mappings (which both are batched into several blocks of
solution mappings).-
Method Summary
Modifier and TypeMethodDescriptiondefault void
processInputFromChild1
(List<SolutionMapping> inputSolMaps, IntermediateResultElementSink sink, ExecutionContext execCxt) Processes the solution mappings of the given list as input coming from the first operand and sends the produced result elements (if any) to the given sink.void
processInputFromChild1
(SolutionMapping inputSolMap, IntermediateResultElementSink sink, ExecutionContext execCxt) Processes the given solution mapping as input coming from the first operand and sends the produced result elements (if any) to the given sink.default void
processInputFromChild2
(List<SolutionMapping> inputSolMaps, IntermediateResultElementSink sink, ExecutionContext execCxt) Processes the solution mappings of the given list as input coming from the second operand and sends the produced result elements (if any) to the given sink.void
processInputFromChild2
(SolutionMapping inputSolMap, IntermediateResultElementSink sink, ExecutionContext execCxt) Processes the given solution mapping as input coming from the second operand and sends the produced result elements (if any) to the given sink.boolean
Returns 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.void
wrapUpForChild1
(IntermediateResultElementSink sink, ExecutionContext execCxt) Finishes up any processing related to the input coming from the first operand and sends the remaining result elements (if any) to the given sink.void
wrapUpForChild2
(IntermediateResultElementSink sink, ExecutionContext execCxt) Finishes up any processing related to the input coming from the second operand and sends the remaining result elements (if any) to the given sink.Methods inherited from interface se.liu.ida.hefquin.engine.queryplan.executable.ExecutableOperator
getExceptionsCaughtDuringExecution, getStats
Methods inherited from interface se.liu.ida.hefquin.base.utils.StatsProvider
resetStats
-
Method Details
-
requiresCompleteChild1InputFirst
boolean requiresCompleteChild1InputFirst()Returns 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 anIllegalStateException
if their methodsinvalid reference
#processBlockFromChild2(IntermediateResultBlock, IntermediateResultElementSink, ExecutionContext)
wrapUpForChild2(IntermediateResultElementSink, ExecutionContext)
are called beforewrapUpForChild1(IntermediateResultElementSink, ExecutionContext)
has been called. -
processInputFromChild1
void processInputFromChild1(SolutionMapping inputSolMap, IntermediateResultElementSink sink, ExecutionContext execCxt) throws ExecOpExecutionException Processes the given solution mapping as input coming from the first operand and sends the produced result elements (if any) to the given sink.- Throws:
ExecOpExecutionException
-
processInputFromChild1
default void processInputFromChild1(List<SolutionMapping> inputSolMaps, IntermediateResultElementSink sink, ExecutionContext execCxt) throws ExecOpExecutionException Processes the solution mappings of the given list as input coming from the first operand and sends the produced result elements (if any) to the given sink. The default implementation of this method simply callsprocessInputFromChild1(SolutionMapping, IntermediateResultElementSink, ExecutionContext)
for every solution mapping of the given list 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).- Throws:
ExecOpExecutionException
-
wrapUpForChild1
void wrapUpForChild1(IntermediateResultElementSink sink, ExecutionContext execCxt) throws ExecOpExecutionException Finishes up any processing related to the input coming from the first operand and sends the remaining result elements (if any) to the given sink. This method will be called only once, after the sub-plan that produces the input coming from the first operand has finished producing its result.- Throws:
ExecOpExecutionException
-
processInputFromChild2
void processInputFromChild2(SolutionMapping inputSolMap, IntermediateResultElementSink sink, ExecutionContext execCxt) throws ExecOpExecutionException Processes the given solution mapping as input coming from the second operand and sends the produced result elements (if any) to the given sink. May throwIllegalStateException
for operators for whichrequiresCompleteChild1InputFirst()
returns true andwrapUpForChild1(IntermediateResultElementSink, ExecutionContext)
has not been called yet.- Throws:
ExecOpExecutionException
-
processInputFromChild2
default void processInputFromChild2(List<SolutionMapping> inputSolMaps, IntermediateResultElementSink sink, ExecutionContext execCxt) throws ExecOpExecutionException Processes the solution mappings of the given list as input coming from the second operand and sends the produced result elements (if any) to the given sink. The default implementation of this method simply callsprocessInputFromChild2(SolutionMapping, IntermediateResultElementSink, ExecutionContext)
for every solution mapping obtained from the given list. 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).- Throws:
ExecOpExecutionException
-
wrapUpForChild2
void wrapUpForChild2(IntermediateResultElementSink sink, ExecutionContext execCxt) throws ExecOpExecutionException Finishes up any processing related to the input coming from the second operand and sends the remaining result elements (if any) to the given sink. This method will be called only once, after the sub-plan that produces the input coming from the second operand has finished producing its result. May throwIllegalStateException
for operators for whichrequiresCompleteChild1InputFirst()
returns true andwrapUpForChild1(IntermediateResultElementSink, ExecutionContext)
has not been called yet.- Throws:
ExecOpExecutionException
-