public class JVMHashJoinOp<E> extends HashJoinOp<E> implements ISingleThreadedOp
IAccessPath
based on the Java collections
classes. Source solutions are buffered on the Java collection on each
evaluation pass. Once ALL source solutions have been buffered, the hash join
will run a single pass over the IAccessPath
for the target
IPredicate
. For some queries, this can be more efficient than probing
as-bound instances of the target IPredicate
using a nested indexed
join, such as PipelineJoin
. This can also be more efficient on a
cluster where the key range scan of the target IPredicate
will be
performed using predominately sequential IO.
The source solutions presented to a hash join MUST have bindings for the
HashJoinAnnotations.JOIN_VARS
in order to join (they can still
succeed as optionals if the join variables are not bound).
JVMHashJoinUtility
,
Serialized FormModifier and Type | Class and Description |
---|---|
static interface |
JVMHashJoinOp.Annotations |
DEFAULT_INITIAL_CAPACITY
Constructor and Description |
---|
JVMHashJoinOp(BOp[] args,
Map<String,Object> annotations) |
JVMHashJoinOp(BOp[] args,
NV... annotations) |
JVMHashJoinOp(JVMHashJoinOp<E> op) |
Modifier and Type | Method and Description |
---|---|
protected IHashJoinUtility |
newState(BOpContext<IBindingSet> context,
INamedSolutionSetRef namedSetRef,
JoinTypeEnum joinType)
Return the instance of the
IHashJoinUtility to be used by this
operator. |
protected boolean |
runHashJoin(BOpContext<?> context,
IHashJoinUtility state)
Return
true if ChunkTask#doHashJoin() should be
executed in a given operator ChunkTask invocation. |
eval, getPredicate, isOptional, newStats
assertAtOnceJavaHeapOp, assertMaxParallelOne, getChunkCapacity, getChunkOfChunksCapacity, getChunkTimeout, getMaxMemory, getMaxParallel, isAtOnceEvaluation, isBlockedEvaluation, isLastPassRequested, isPipelinedEvaluation, isReorderSolutions, isSharedState
__replaceArg, _clearProperty, _set, _setProperty, annotations, annotationsCopy, annotationsEqual, annotationsRef, argIterator, args, argsCopy, arity, clearAnnotations, clearProperty, deepCopy, deepCopy, get, getProperty, setArg, setProperty, setUnboundProperty, toArray, toArray
annotationsEqual, annotationsToString, annotationsToString, annotationValueToString, checkArgs, clone, equals, getEvaluationContext, getId, getProperty, getRequiredProperty, hashCode, indent, isController, mutation, shortenName, toShortString, toString, toString
public JVMHashJoinOp(JVMHashJoinOp<E> op)
op
- protected IHashJoinUtility newState(BOpContext<IBindingSet> context, INamedSolutionSetRef namedSetRef, JoinTypeEnum joinType)
HashJoinOp
IHashJoinUtility
to be used by this
operator. This method is invoked once, the first time this operator is
evaluated. The returned IHashJoinUtility
reference is attached to
the IQueryAttributes
and accessed there on subsequent evaluation
passes for this operator.newState
in class HashJoinOp<E>
context
- The BOpEvaluationContext
namedSetRef
- Metadata to identify the named solution set.joinType
- The type of join.protected boolean runHashJoin(BOpContext<?> context, IHashJoinUtility state)
true
if ChunkTask#doHashJoin()
should be
executed in a given operator ChunkTask
invocation.
The JVMHashJoinOp
executes the hash join for each chunk of
intermediate solutions (it is not an "at-once" operator).
Note: Because this is an at-once operator, the solutions are all buffered on the query engine and this operator is invoked exactly once.
Unlike the HTreeHashJoinOp
, the concept of a LAST PASS evaluation
does not enter in to the evaluation of this operator. However, by
publishing the [state] on the query attribute we do gain visibility into
the dynamics of the hash join while it is executing against the B+Tree
access path.
runHashJoin
in class HashJoinOp<E>
context
- The operator evaluation context.state
- The IHashJoinUtility
instance.Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.