Interface BinaryExecutableOp
- All Superinterfaces:
ExecutableOperator,StatsProvider
- All Known Implementing Classes:
BaseForExecOpHashJoin,BinaryExecutableOpBase,ExecOpBinaryUnion,ExecOpHashBasedMinus,ExecOpHashJoin1,ExecOpHashJoin2,ExecOpNaiveNestedLoopsJoin,ExecOpSymmetricHashJoin
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 voidprocessInputFromChild1(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.voidprocessInputFromChild1(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 voidprocessInputFromChild2(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.voidprocessInputFromChild2(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.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.booleanReturns true if this operator is implemented based on the assumption that the COMPLETE input from the second operand has been sent to it before input from the first operand is sent.voidwrapUpForChild1(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.voidwrapUpForChild2(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, getQueryPlanningInfo, getStatsMethods 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
truehere must returnfalseforrequiresCompleteChild2InputFirst().Operators that return
truehere may throw anIllegalStateExceptionif their methodsorinvalid reference
#processBlockFromChild2(IntermediateResultBlock, IntermediateResultElementSink, ExecutionContext)wrapUpForChild2(IntermediateResultElementSink, ExecutionContext)are called beforewrapUpForChild1(IntermediateResultElementSink, ExecutionContext)has been called. -
requiresCompleteChild2InputFirst
boolean requiresCompleteChild2InputFirst()Returns true if this operator is implemented based on the assumption that the COMPLETE input from the second operand has been sent to it before input from the first operand is sent.An example of an operator that may return true here is a hash join that first adds all result elements from the second operand into its hash table and, then, can start consuming the result elements from the first operand by probing into the hash table (which may be useful especially for a left outer join.
Operators that return
truehere must returnfalseforrequiresCompleteChild1InputFirst().Operators that return
truehere may throw anIllegalStateExceptionif their methodsorinvalid reference
#processBlockFromChild1(IntermediateResultBlock, IntermediateResultElementSink, ExecutionContext)wrapUpForChild1(IntermediateResultElementSink, ExecutionContext)are called beforewrapUpForChild2(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.May throw
IllegalStateExceptionfor operators for whichrequiresCompleteChild2InputFirst()returns true andwrapUpForChild2(IntermediateResultElementSink, ExecutionContext)has not been called yet.- 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 calls
processInputFromChild1(SolutionMapping, IntermediateResultElementSink, ExecutionContext)for every solution mapping of the given listSubclasses 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.
May throw
IllegalStateExceptionfor operators for whichrequiresCompleteChild2InputFirst()returns true andwrapUpForChild2(IntermediateResultElementSink, ExecutionContext)has not been called yet.- 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 throw
IllegalStateExceptionfor 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 throwIllegalStateExceptionfor operators for whichrequiresCompleteChild1InputFirst()returns true andwrapUpForChild1(IntermediateResultElementSink, ExecutionContext)has not been called yet.- Throws:
ExecOpExecutionException
-